From 5cec95e86fa6bb917ef3f50d7a03a704276c581f Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Mon, 6 May 2024 09:37:00 +0000 Subject: [PATCH] CodeGen from PR 28985 in Azure/azure-rest-api-specs Merge bc849bef32842cd97f9386e39cb37266dc6498de into a8698bb86e66e2d29ce5e8987b6aaa8fc7f7f04b --- ...sourceManager.BotService.netstandard2.0.cs | 248 ++++++++++- .../Samples/Sample_BotChannelCollection.cs | 36 +- .../Samples/Sample_BotChannelResource.cs | 22 +- .../Generated/Samples/Sample_BotCollection.cs | 10 +- .../Sample_BotConnectionSettingCollection.cs | 10 +- .../Sample_BotConnectionSettingResource.cs | 12 +- .../Generated/Samples/Sample_BotResource.cs | 18 +- ...vicePrivateEndpointConnectionCollection.cs | 10 +- ...ervicePrivateEndpointConnectionResource.cs | 6 +- ...ecurityPerimeterConfigurationCollection.cs | 163 +++++++ ...kSecurityPerimeterConfigurationResource.cs | 82 ++++ .../Sample_SubscriptionResourceExtensions.cs | 4 +- .../Generated/ArmBotServiceModelFactory.cs | 218 ++++++++- .../src/Generated/BotChannelCollection.cs | 20 +- .../src/Generated/BotChannelResource.cs | 28 +- .../src/Generated/BotCollection.cs | 20 +- .../BotConnectionSettingCollection.cs | 20 +- .../Generated/BotConnectionSettingResource.cs | 28 +- .../src/Generated/BotResource.cs | 117 ++++- ...vicePrivateEndpointConnectionCollection.cs | 20 +- ...ervicePrivateEndpointConnectionResource.cs | 12 +- .../Extensions/BotServiceExtensions.cs | 43 +- .../Extensions/MockableBotServiceArmClient.cs | 12 + ...MockableBotServiceResourceGroupResource.cs | 4 +- .../MockableBotServiceSubscriptionResource.cs | 16 +- .../MockableBotServiceTenantResource.cs | 4 +- ...tyPerimeterConfigurationOperationSource.cs | 38 ++ .../src/Generated/Models/AccessMode.cs | 54 +++ ...nnectionSettingProperties.Serialization.cs | 24 + .../Models/BotConnectionSettingProperties.cs | 10 +- .../Models/BotProperties.Serialization.cs | 26 ++ .../src/Generated/Models/BotProperties.cs | 7 +- .../Models/BotServicePublicNetworkAccess.cs | 3 + .../NetworkSecurityPerimeter.Serialization.cs | 152 +++++++ .../Models/NetworkSecurityPerimeter.cs | 74 ++++ ...erimeterConfigurationList.Serialization.cs | 147 +++++++ ...tworkSecurityPerimeterConfigurationList.cs | 70 +++ ...erConfigurationProperties.Serialization.cs | 202 +++++++++ ...ecurityPerimeterConfigurationProperties.cs | 82 ++++ .../Models/NspAccessRule.Serialization.cs | 137 ++++++ .../src/Generated/Models/NspAccessRule.cs | 69 +++ .../Models/NspAccessRuleDirection.cs | 51 +++ .../NspAccessRuleProperties.Serialization.cs | 285 ++++++++++++ .../Models/NspAccessRuleProperties.cs | 96 ++++ .../Generated/Models/Profile.Serialization.cs | 208 +++++++++ .../src/Generated/Models/Profile.cs | 83 ++++ .../Models/ProvisioningIssue.Serialization.cs | 137 ++++++ .../src/Generated/Models/ProvisioningIssue.cs | 69 +++ ...ovisioningIssueProperties.Serialization.cs | 216 +++++++++ .../Models/ProvisioningIssueProperties.cs | 84 ++++ .../src/Generated/Models/ProvisioningState.cs | 63 +++ .../ResourceAssociation.Serialization.cs | 137 ++++++ .../Generated/Models/ResourceAssociation.cs | 69 +++ .../src/Generated/Models/Severity.cs | 51 +++ ...ecurityPerimeterConfigurationCollection.cs | 395 +++++++++++++++++ ...erimeterConfigurationData.Serialization.cs | 182 ++++++++ ...tworkSecurityPerimeterConfigurationData.cs | 75 ++++ ...eterConfigurationResource.Serialization.cs | 26 ++ ...kSecurityPerimeterConfigurationResource.cs | 255 +++++++++++ .../BotConnectionRestOperations.cs | 2 +- .../RestOperations/BotsRestOperations.cs | 2 +- .../RestOperations/ChannelsRestOperations.cs | 2 +- .../DirectLineRestOperations.cs | 2 +- .../RestOperations/EmailRestOperations.cs | 2 +- .../HostSettingsRestOperations.cs | 2 +- ...tyPerimeterConfigurationsRestOperations.cs | 415 ++++++++++++++++++ ...rivateEndpointConnectionsRestOperations.cs | 2 +- .../PrivateLinkResourcesRestOperations.cs | 2 +- .../QnAMakerEndpointKeysRestOperations.cs | 2 +- .../src/autorest.md | 2 +- 70 files changed, 4994 insertions(+), 201 deletions(-) create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationOperationSource.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/AccessMode.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleDirection.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningState.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Severity.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs create mode 100644 sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs diff --git a/sdk/botservice/Azure.ResourceManager.BotService/api/Azure.ResourceManager.BotService.netstandard2.0.cs b/sdk/botservice/Azure.ResourceManager.BotService/api/Azure.ResourceManager.BotService.netstandard2.0.cs index 74e191ff08cc..45fc2d88ae02 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/api/Azure.ResourceManager.BotService.netstandard2.0.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/api/Azure.ResourceManager.BotService.netstandard2.0.cs @@ -173,6 +173,9 @@ protected BotResource() { } public virtual Azure.Response GetBotServicePrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetBotServicePrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionCollection GetBotServicePrivateEndpointConnections() { throw null; } + public virtual Azure.Response GetNetworkSecurityPerimeterConfiguration(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetNetworkSecurityPerimeterConfigurationAsync(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurityPerimeterConfigurations() { throw null; } public virtual Azure.Pageable GetPrivateLinkResourcesByBotResource(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetPrivateLinkResourcesByBotResourceAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -206,6 +209,7 @@ public static partial class BotServiceExtensions public static Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionResource GetBotServicePrivateEndpointConnectionResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetBotServiceQnAMakerEndpointKey(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.BotService.Models.GetBotServiceQnAMakerEndpointKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetBotServiceQnAMakerEndpointKeyAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.BotService.Models.GetBotServiceQnAMakerEndpointKeyContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } } public partial class BotServicePrivateEndpointConnectionCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { @@ -256,6 +260,48 @@ protected BotServicePrivateEndpointConnectionResource() { } public virtual Azure.ResourceManager.ArmOperation Update(Azure.WaitUntil waitUntil, Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.WaitUntil waitUntil, Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionData data, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } + public partial class NetworkSecurityPerimeterConfigurationCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected NetworkSecurityPerimeterConfigurationCollection() { } + public virtual Azure.Response Exists(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.NullableResponse GetIfExists(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string networkSecurityPerimeterConfigurationName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeterConfigurationData() { } + public Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeterConfigurationProperties Properties { get { throw null; } } + Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationResource : Azure.ResourceManager.ArmResource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public static readonly Azure.Core.ResourceType ResourceType; + protected NetworkSecurityPerimeterConfigurationResource() { } + public virtual Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Reconcile(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ReconcileAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } } namespace Azure.ResourceManager.BotService.Mocking { @@ -266,6 +312,7 @@ protected MockableBotServiceArmClient() { } public virtual Azure.ResourceManager.BotService.BotConnectionSettingResource GetBotConnectionSettingResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.BotService.BotResource GetBotResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionResource GetBotServicePrivateEndpointConnectionResource(Azure.Core.ResourceIdentifier id) { throw null; } + public virtual Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(Azure.Core.ResourceIdentifier id) { throw null; } } public partial class MockableBotServiceResourceGroupResource : Azure.ResourceManager.ArmResource { @@ -295,6 +342,25 @@ protected MockableBotServiceTenantResource() { } } namespace Azure.ResourceManager.BotService.Models { + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct AccessMode : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public AccessMode(string value) { throw null; } + public static Azure.ResourceManager.BotService.Models.AccessMode Audit { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.AccessMode Enforced { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.AccessMode Learning { get { throw null; } } + public bool Equals(Azure.ResourceManager.BotService.Models.AccessMode other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.BotService.Models.AccessMode left, Azure.ResourceManager.BotService.Models.AccessMode right) { throw null; } + public static implicit operator Azure.ResourceManager.BotService.Models.AccessMode (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.BotService.Models.AccessMode left, Azure.ResourceManager.BotService.Models.AccessMode right) { throw null; } + public override string ToString() { throw null; } + } public partial class AcsChatChannel : Azure.ResourceManager.BotService.Models.BotChannelProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public AcsChatChannel() { } @@ -337,10 +403,14 @@ public static partial class ArmBotServiceModelFactory public static Azure.ResourceManager.BotService.Models.BotChannelProperties BotChannelProperties(string channelName = null, Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.BotService.Models.BotChannelSite BotChannelSite(System.Guid? tenantId = default(System.Guid?), string siteId = null, string siteName = null, string key = null, string key2 = null, bool isEnabled = false, bool? isTokenEnabled = default(bool?), bool? isEndpointParametersEnabled = default(bool?), bool? isDetailedLoggingEnabled = default(bool?), bool? isBlockUserUploadEnabled = default(bool?), bool? isNoStorageEnabled = default(bool?), Azure.ETag? etag = default(Azure.ETag?), string appId = null, bool? isV1Enabled = default(bool?), bool? isV3Enabled = default(bool?), bool? isSecureSiteEnabled = default(bool?), System.Collections.Generic.IEnumerable trustedOrigins = null, bool? isWebChatSpeechEnabled = default(bool?), bool? isWebchatPreviewEnabled = default(bool?)) { throw null; } public static Azure.ResourceManager.BotService.BotConnectionSettingData BotConnectionSettingData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.BotService.Models.BotConnectionSettingProperties properties = null, Azure.ResourceManager.BotService.Models.BotServiceSku sku = null, Azure.ResourceManager.BotService.Models.BotServiceKind? kind = default(Azure.ResourceManager.BotService.Models.BotServiceKind?), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.BotService.Models.BotConnectionSettingProperties BotConnectionSettingProperties(string clientId = null, string settingId = null, string clientSecret = null, string scopes = null, string serviceProviderId = null, string serviceProviderDisplayName = null, System.Collections.Generic.IEnumerable parameters = null, string provisioningState = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.BotService.Models.BotConnectionSettingProperties BotConnectionSettingProperties(string clientId, string settingId, string clientSecret, string scopes, string serviceProviderId, string serviceProviderDisplayName, System.Collections.Generic.IEnumerable parameters, string provisioningState) { throw null; } + public static Azure.ResourceManager.BotService.Models.BotConnectionSettingProperties BotConnectionSettingProperties(string id = null, string name = null, string clientId = null, string settingId = null, string clientSecret = null, string scopes = null, string serviceProviderId = null, string serviceProviderDisplayName = null, System.Collections.Generic.IEnumerable parameters = null, string provisioningState = null) { throw null; } public static Azure.ResourceManager.BotService.Models.BotCreateEmailSignInUriResult BotCreateEmailSignInUriResult(Azure.Core.ResourceIdentifier id = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Uri createEmailSignInUrlResponseUri = null) { throw null; } public static Azure.ResourceManager.BotService.BotData BotData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.BotService.Models.BotProperties properties = null, Azure.ResourceManager.BotService.Models.BotServiceSku sku = null, Azure.ResourceManager.BotService.Models.BotServiceKind? kind = default(Azure.ResourceManager.BotService.Models.BotServiceKind?), Azure.ETag? etag = default(Azure.ETag?), System.Collections.Generic.IEnumerable zones = null) { throw null; } - public static Azure.ResourceManager.BotService.Models.BotProperties BotProperties(string displayName = null, string description = null, System.Uri iconUri = null, System.Uri endpoint = null, string endpointVersion = null, System.Collections.Generic.IDictionary allSettings = null, System.Collections.Generic.IDictionary parameters = null, System.Uri manifestUri = null, Azure.ResourceManager.BotService.Models.BotMsaAppType? msaAppType = default(Azure.ResourceManager.BotService.Models.BotMsaAppType?), string msaAppId = null, string msaAppTenantId = null, Azure.Core.ResourceIdentifier msaAppMSIResourceId = null, System.Collections.Generic.IEnumerable configuredChannels = null, System.Collections.Generic.IEnumerable enabledChannels = null, string developerAppInsightKey = null, string developerAppInsightsApiKey = null, string developerAppInsightsApplicationId = null, System.Collections.Generic.IEnumerable luisAppIds = null, string luisKey = null, bool? isCmekEnabled = default(bool?), System.Uri cmekKeyVaultUri = null, string cmekEncryptionStatus = null, System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess?), bool? isStreamingSupported = default(bool?), bool? isDeveloperAppInsightsApiKeySet = default(bool?), string migrationToken = null, bool? isLocalAuthDisabled = default(bool?), string schemaTransformationVersion = null, Azure.Core.ResourceIdentifier storageResourceId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, string openWithHint = null, string appPasswordHint = null, string provisioningState = null, string publishingCredentials = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.BotProperties BotProperties(string displayName = null, string description = null, System.Uri iconUri = null, System.Uri endpoint = null, string endpointVersion = null, System.Collections.Generic.IDictionary allSettings = null, System.Collections.Generic.IDictionary parameters = null, System.Uri manifestUri = null, Azure.ResourceManager.BotService.Models.BotMsaAppType? msaAppType = default(Azure.ResourceManager.BotService.Models.BotMsaAppType?), string msaAppId = null, string msaAppTenantId = null, Azure.Core.ResourceIdentifier msaAppMSIResourceId = null, System.Collections.Generic.IEnumerable configuredChannels = null, System.Collections.Generic.IEnumerable enabledChannels = null, string developerAppInsightKey = null, string developerAppInsightsApiKey = null, string developerAppInsightsApplicationId = null, System.Collections.Generic.IEnumerable luisAppIds = null, string luisKey = null, bool? isCmekEnabled = default(bool?), System.Uri cmekKeyVaultUri = null, string cmekEncryptionStatus = null, System.Guid? tenantId = default(System.Guid?), Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess? publicNetworkAccess = default(Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess?), bool? isStreamingSupported = default(bool?), bool? isDeveloperAppInsightsApiKeySet = default(bool?), string migrationToken = null, bool? isLocalAuthDisabled = default(bool?), string schemaTransformationVersion = null, Azure.Core.ResourceIdentifier storageResourceId = null, System.Collections.Generic.IEnumerable privateEndpointConnections = null, System.Collections.Generic.IEnumerable networkSecurityPerimeterConfigurations = null, string openWithHint = null, string appPasswordHint = null, string provisioningState = null, string publishingCredentials = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.BotService.Models.BotProperties BotProperties(string displayName, string description, System.Uri iconUri, System.Uri endpoint, string endpointVersion, System.Collections.Generic.IDictionary allSettings, System.Collections.Generic.IDictionary parameters, System.Uri manifestUri, Azure.ResourceManager.BotService.Models.BotMsaAppType? msaAppType, string msaAppId, string msaAppTenantId, Azure.Core.ResourceIdentifier msaAppMSIResourceId, System.Collections.Generic.IEnumerable configuredChannels, System.Collections.Generic.IEnumerable enabledChannels, string developerAppInsightKey, string developerAppInsightsApiKey, string developerAppInsightsApplicationId, System.Collections.Generic.IEnumerable luisAppIds, string luisKey, bool? isCmekEnabled, System.Uri cmekKeyVaultUri, string cmekEncryptionStatus, System.Guid? tenantId, Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess? publicNetworkAccess, bool? isStreamingSupported, bool? isDeveloperAppInsightsApiKeySet, string migrationToken, bool? isLocalAuthDisabled, string schemaTransformationVersion, Azure.Core.ResourceIdentifier storageResourceId, System.Collections.Generic.IEnumerable privateEndpointConnections, string openWithHint, string appPasswordHint, string provisioningState, string publishingCredentials) { throw null; } public static Azure.ResourceManager.BotService.Models.BotServiceHostSettingsResult BotServiceHostSettingsResult(System.Uri oAuthUri = null, System.Uri toBotFromChannelOpenIdMetadataUri = null, string toBotFromChannelTokenIssuer = null, System.Uri toBotFromEmulatorOpenIdMetadataUri = null, System.Uri toChannelFromBotLoginUri = null, string toChannelFromBotOAuthScope = null, bool? validateAuthority = default(bool?), string botOpenIdMetadata = null) { throw null; } public static Azure.ResourceManager.BotService.Models.BotServiceNameAvailabilityResult BotServiceNameAvailabilityResult(bool? isValid = default(bool?), string message = null, string absCode = null) { throw null; } public static Azure.ResourceManager.BotService.BotServicePrivateEndpointConnectionData BotServicePrivateEndpointConnectionData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.Core.ResourceIdentifier privateEndpointId = null, Azure.ResourceManager.BotService.Models.BotServicePrivateLinkServiceConnectionState connectionState = null, Azure.ResourceManager.BotService.Models.BotServicePrivateEndpointConnectionProvisioningState? provisioningState = default(Azure.ResourceManager.BotService.Models.BotServicePrivateEndpointConnectionProvisioningState?), System.Collections.Generic.IEnumerable groupIds = null) { throw null; } @@ -362,8 +432,17 @@ public static partial class ArmBotServiceModelFactory public static Azure.ResourceManager.BotService.Models.LineRegistration LineRegistration(string generatedId = null, string channelSecret = null, string channelAccessToken = null) { throw null; } public static Azure.ResourceManager.BotService.Models.M365Extensions M365Extensions(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.BotService.Models.MsTeamsChannel MsTeamsChannel(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.BotService.Models.MsTeamsChannelProperties properties = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeter NetworkSecurityPerimeter(Azure.Core.ResourceIdentifier id = null, string perimeterGuid = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.BotService.NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeterConfigurationProperties properties = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeterConfigurationProperties NetworkSecurityPerimeterConfigurationProperties(Azure.ResourceManager.BotService.Models.ProvisioningState? provisioningState = default(Azure.ResourceManager.BotService.Models.ProvisioningState?), System.Collections.Generic.IEnumerable provisioningIssues = null, Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeter networkSecurityPerimeter = null, Azure.ResourceManager.BotService.Models.ResourceAssociation resourceAssociation = null, Azure.ResourceManager.BotService.Models.Profile profile = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.NspAccessRule NspAccessRule(string name = null, Azure.ResourceManager.BotService.Models.NspAccessRuleProperties properties = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.NspAccessRuleProperties NspAccessRuleProperties(Azure.ResourceManager.BotService.Models.NspAccessRuleDirection? direction = default(Azure.ResourceManager.BotService.Models.NspAccessRuleDirection?), System.Collections.Generic.IEnumerable addressPrefixes = null, System.Collections.Generic.IEnumerable subscriptions = null, System.Collections.Generic.IEnumerable networkSecurityPerimeters = null, System.Collections.Generic.IEnumerable fullyQualifiedDomainNames = null, System.Collections.Generic.IEnumerable emailAddresses = null, System.Collections.Generic.IEnumerable phoneNumbers = null) { throw null; } public static Azure.ResourceManager.BotService.Models.Omnichannel Omnichannel(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.BotService.Models.OutlookChannel OutlookChannel(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } + public static Azure.ResourceManager.BotService.Models.Profile Profile(string name = null, long? accessRulesVersion = default(long?), System.Collections.Generic.IEnumerable accessRules = null, long? diagnosticSettingsVersion = default(long?), System.Collections.Generic.IEnumerable enabledLogCategories = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.ProvisioningIssue ProvisioningIssue(string name = null, Azure.ResourceManager.BotService.Models.ProvisioningIssueProperties properties = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.ProvisioningIssueProperties ProvisioningIssueProperties(string issueType = null, Azure.ResourceManager.BotService.Models.Severity? severity = default(Azure.ResourceManager.BotService.Models.Severity?), string description = null, System.Collections.Generic.IEnumerable suggestedResourceIds = null, System.Collections.Generic.IEnumerable suggestedAccessRules = null) { throw null; } + public static Azure.ResourceManager.BotService.Models.ResourceAssociation ResourceAssociation(string name = null, Azure.ResourceManager.BotService.Models.AccessMode? accessMode = default(Azure.ResourceManager.BotService.Models.AccessMode?)) { throw null; } public static Azure.ResourceManager.BotService.Models.SearchAssistant SearchAssistant(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?)) { throw null; } public static Azure.ResourceManager.BotService.Models.SkypeChannel SkypeChannel(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.BotService.Models.SkypeChannelProperties properties = null) { throw null; } public static Azure.ResourceManager.BotService.Models.SlackChannel SlackChannel(Azure.ETag? etag = default(Azure.ETag?), string provisioningState = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), Azure.ResourceManager.BotService.Models.SlackChannelProperties properties = null) { throw null; } @@ -515,6 +594,8 @@ public partial class BotConnectionSettingProperties : System.ClientModel.Primiti public BotConnectionSettingProperties() { } public string ClientId { get { throw null; } set { } } public string ClientSecret { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public string Name { get { throw null; } set { } } public System.Collections.Generic.IList Parameters { get { throw null; } } public string ProvisioningState { get { throw null; } set { } } public string Scopes { get { throw null; } set { } } @@ -587,6 +668,7 @@ public BotProperties(string displayName, System.Uri endpoint, string msaAppId) { public Azure.Core.ResourceIdentifier MsaAppMSIResourceId { get { throw null; } set { } } public string MsaAppTenantId { get { throw null; } set { } } public Azure.ResourceManager.BotService.Models.BotMsaAppType? MsaAppType { get { throw null; } set { } } + public System.Collections.Generic.IReadOnlyList NetworkSecurityPerimeterConfigurations { get { throw null; } } public string OpenWithHint { get { throw null; } set { } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } public System.Collections.Generic.IReadOnlyList PrivateEndpointConnections { get { throw null; } } @@ -780,6 +862,7 @@ internal BotServiceProviderProperties() { } public BotServicePublicNetworkAccess(string value) { throw null; } public static Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess Disabled { get { throw null; } } public static Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess Enabled { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess SecuredByPerimeter { get { throw null; } } public bool Equals(Azure.ResourceManager.BotService.Models.BotServicePublicNetworkAccess other) { throw null; } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override bool Equals(object obj) { throw null; } @@ -1075,6 +1158,77 @@ public MsTeamsChannelProperties(bool isEnabled) { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class NetworkSecurityPerimeter : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeter() { } + public Azure.Core.ResourceIdentifier Id { get { throw null; } } + public Azure.Core.AzureLocation? Location { get { throw null; } } + public string PerimeterGuid { get { throw null; } } + Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeter System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeter System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NetworkSecurityPerimeterConfigurationProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NetworkSecurityPerimeterConfigurationProperties() { } + public Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeter NetworkSecurityPerimeter { get { throw null; } } + public Azure.ResourceManager.BotService.Models.Profile Profile { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ProvisioningIssues { get { throw null; } } + public Azure.ResourceManager.BotService.Models.ProvisioningState? ProvisioningState { get { throw null; } } + public Azure.ResourceManager.BotService.Models.ResourceAssociation ResourceAssociation { get { throw null; } } + Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeterConfigurationProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.NetworkSecurityPerimeterConfigurationProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class NspAccessRule : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NspAccessRule() { } + public string Name { get { throw null; } } + public Azure.ResourceManager.BotService.Models.NspAccessRuleProperties Properties { get { throw null; } } + Azure.ResourceManager.BotService.Models.NspAccessRule System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.NspAccessRule System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct NspAccessRuleDirection : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public NspAccessRuleDirection(string value) { throw null; } + public static Azure.ResourceManager.BotService.Models.NspAccessRuleDirection Inbound { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.NspAccessRuleDirection Outbound { get { throw null; } } + public bool Equals(Azure.ResourceManager.BotService.Models.NspAccessRuleDirection other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.BotService.Models.NspAccessRuleDirection left, Azure.ResourceManager.BotService.Models.NspAccessRuleDirection right) { throw null; } + public static implicit operator Azure.ResourceManager.BotService.Models.NspAccessRuleDirection (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.BotService.Models.NspAccessRuleDirection left, Azure.ResourceManager.BotService.Models.NspAccessRuleDirection right) { throw null; } + public override string ToString() { throw null; } + } + public partial class NspAccessRuleProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal NspAccessRuleProperties() { } + public System.Collections.Generic.IReadOnlyList AddressPrefixes { get { throw null; } } + public Azure.ResourceManager.BotService.Models.NspAccessRuleDirection? Direction { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EmailAddresses { get { throw null; } } + public System.Collections.Generic.IReadOnlyList FullyQualifiedDomainNames { get { throw null; } } + public System.Collections.Generic.IReadOnlyList NetworkSecurityPerimeters { get { throw null; } } + public System.Collections.Generic.IReadOnlyList PhoneNumbers { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Subscriptions { get { throw null; } } + Azure.ResourceManager.BotService.Models.NspAccessRuleProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.NspAccessRuleProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class Omnichannel : Azure.ResourceManager.BotService.Models.BotChannelProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public Omnichannel() { } @@ -1093,11 +1247,83 @@ public OutlookChannel() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class Profile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal Profile() { } + public System.Collections.Generic.IReadOnlyList AccessRules { get { throw null; } } + public long? AccessRulesVersion { get { throw null; } } + public long? DiagnosticSettingsVersion { get { throw null; } } + public System.Collections.Generic.IReadOnlyList EnabledLogCategories { get { throw null; } } + public string Name { get { throw null; } } + Azure.ResourceManager.BotService.Models.Profile System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.Profile System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProvisioningIssue : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProvisioningIssue() { } + public string Name { get { throw null; } } + public Azure.ResourceManager.BotService.Models.ProvisioningIssueProperties Properties { get { throw null; } } + Azure.ResourceManager.BotService.Models.ProvisioningIssue System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.ProvisioningIssue System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ProvisioningIssueProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProvisioningIssueProperties() { } + public string Description { get { throw null; } } + public string IssueType { get { throw null; } } + public Azure.ResourceManager.BotService.Models.Severity? Severity { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SuggestedAccessRules { get { throw null; } } + public System.Collections.Generic.IReadOnlyList SuggestedResourceIds { get { throw null; } } + Azure.ResourceManager.BotService.Models.ProvisioningIssueProperties System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.ProvisioningIssueProperties System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Accepted { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Deleting { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.ProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.BotService.Models.ProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.BotService.Models.ProvisioningState left, Azure.ResourceManager.BotService.Models.ProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.BotService.Models.ProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.BotService.Models.ProvisioningState left, Azure.ResourceManager.BotService.Models.ProvisioningState right) { throw null; } + public override string ToString() { throw null; } + } public enum RegenerateKeysBotChannelName { WebChatChannel = 0, DirectLineChannel = 1, } + public partial class ResourceAssociation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ResourceAssociation() { } + public Azure.ResourceManager.BotService.Models.AccessMode? AccessMode { get { throw null; } } + public string Name { get { throw null; } } + Azure.ResourceManager.BotService.Models.ResourceAssociation System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.BotService.Models.ResourceAssociation System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SearchAssistant : Azure.ResourceManager.BotService.Models.BotChannelProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SearchAssistant() { } @@ -1107,6 +1333,24 @@ public SearchAssistant() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct Severity : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public Severity(string value) { throw null; } + public static Azure.ResourceManager.BotService.Models.Severity Error { get { throw null; } } + public static Azure.ResourceManager.BotService.Models.Severity Warning { get { throw null; } } + public bool Equals(Azure.ResourceManager.BotService.Models.Severity other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.BotService.Models.Severity left, Azure.ResourceManager.BotService.Models.Severity right) { throw null; } + public static implicit operator Azure.ResourceManager.BotService.Models.Severity (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.BotService.Models.Severity left, Azure.ResourceManager.BotService.Models.Severity right) { throw null; } + public override string ToString() { throw null; } + } public partial class SkypeChannel : Azure.ResourceManager.BotService.Models.BotChannelProperties, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SkypeChannel() { } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelCollection.cs index a4f4c418725b..cbfd61200658 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BotChannelCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutAlexaChannel.json // this example is just showing the usage of "Channels_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task CreateOrUpdate_CreateAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutChannel.json // this example is just showing the usage of "Channels_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -109,7 +109,7 @@ public async Task CreateOrUpdate_CreateChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task CreateOrUpdate_CreateDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateEmailChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutEmailChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutEmailChannel.json // this example is just showing the usage of "Channels_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -204,7 +204,7 @@ public async Task CreateOrUpdate_CreateEmailChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutLineChannel.json // this example is just showing the usage of "Channels_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -254,7 +254,7 @@ public async Task CreateOrUpdate_CreateLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetAlexaChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -289,7 +289,7 @@ public async Task Get_GetAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetAlexaChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -320,7 +320,7 @@ public async Task Exists_GetAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetAlexaChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -363,7 +363,7 @@ public async Task GetIfExists_GetAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -398,7 +398,7 @@ public async Task Get_GetChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -429,7 +429,7 @@ public async Task Exists_GetChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -472,7 +472,7 @@ public async Task GetIfExists_GetChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -507,7 +507,7 @@ public async Task Get_GetDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -538,7 +538,7 @@ public async Task Exists_GetDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -581,7 +581,7 @@ public async Task GetIfExists_GetDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetLineChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -616,7 +616,7 @@ public async Task Get_GetLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetLineChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -647,7 +647,7 @@ public async Task Exists_GetLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetLineChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -690,7 +690,7 @@ public async Task GetIfExists_GetLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListChannelsByResourceGroup() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListChannelsByBotService.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListChannelsByBotService.json // this example is just showing the usage of "Channels_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelResource.cs index b6c87bc5bbfb..040ad0a1cdcf 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotChannelResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BotChannelResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateAlexaChannel.json // this example is just showing the usage of "Channels_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Update_UpdateAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateChannel.json // this example is just showing the usage of "Channels_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -101,7 +101,7 @@ public async Task Update_UpdateChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task Update_UpdateDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateLineChannel.json // this example is just showing the usage of "Channels_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -191,7 +191,7 @@ public async Task Update_UpdateLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DeleteChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DeleteChannel.json // this example is just showing the usage of "Channels_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,7 +219,7 @@ public async Task Delete_DeleteChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DeleteDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DeleteDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -247,7 +247,7 @@ public async Task Delete_DeleteDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetAlexaChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetAlexaChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetAlexaChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -279,7 +279,7 @@ public async Task Get_GetAlexaChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -311,7 +311,7 @@ public async Task Get_GetChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDirectLineSpeechChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetDirectLineSpeechChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetDirectLineSpeechChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -343,7 +343,7 @@ public async Task Get_GetDirectLineSpeechChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetLineChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetLineChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetLineChannel.json // this example is just showing the usage of "Channels_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -375,7 +375,7 @@ public async Task Get_GetLineChannel() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetChannelWithKeys_ListChannel() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListChannel.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListChannel.json // this example is just showing the usage of "Channels_ListWithKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotCollection.cs index df1bbac085eb..8b0dfce4a620 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_BotCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/CreateBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/CreateBot.json // this example is just showing the usage of "Bots_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -88,7 +88,7 @@ public async Task CreateOrUpdate_CreateBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetBot.json // this example is just showing the usage of "Bots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -122,7 +122,7 @@ public async Task Get_GetBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetBot.json // this example is just showing the usage of "Bots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -152,7 +152,7 @@ public async Task Exists_GetBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetBot.json // this example is just showing the usage of "Bots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -194,7 +194,7 @@ public async Task GetIfExists_GetBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListBotsByResourceGroup() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListBotsByResourceGroup.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListBotsByResourceGroup.json // this example is just showing the usage of "Bots_ListByResourceGroup" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingCollection.cs index 00563f82cc8e..16292bcb7be5 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BotConnectionSettingCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutConnection.json // this example is just showing the usage of "BotConnection_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -79,7 +79,7 @@ public async Task CreateOrUpdate_CreateConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetConnection.json // this example is just showing the usage of "BotConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -114,7 +114,7 @@ public async Task Get_GetConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetConnection.json // this example is just showing the usage of "BotConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -145,7 +145,7 @@ public async Task Exists_GetConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetConnection.json // this example is just showing the usage of "BotConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +188,7 @@ public async Task GetIfExists_GetConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListConnectionSettings() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListConnectionsByBotService.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListConnectionsByBotService.json // this example is just showing the usage of "BotConnection_ListByBotService" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingResource.cs index 69b9dc46af5b..ef566191248f 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotConnectionSettingResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BotConnectionSettingResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBotConnectionServiceProviders_ListAuthServiceProviders() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListServiceProviders.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListServiceProviders.json // this example is just showing the usage of "BotConnection_ListServiceProviders" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task GetBotConnectionServiceProviders_ListAuthServiceProviders() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWithSecrets_ListConnectionSettingWithSecrets() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetConnection.json // this example is just showing the usage of "BotConnection_ListWithSecrets" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -81,7 +81,7 @@ public async Task GetWithSecrets_ListConnectionSettingWithSecrets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateConnection.json // this example is just showing the usage of "BotConnection_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,6 +103,8 @@ public async Task Update_UpdateConnectionSetting() { Properties = new BotConnectionSettingProperties() { + Id = "sampleId", + Name = "sampleName", ClientId = "sampleclientid", ClientSecret = "samplesecret", Scopes = "samplescope", @@ -137,7 +139,7 @@ public async Task Update_UpdateConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetConnection.json // this example is just showing the usage of "BotConnection_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +171,7 @@ public async Task Get_GetConnectionSetting() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteConnectionSetting() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DeleteConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DeleteConnection.json // this example is just showing the usage of "BotConnection_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotResource.cs index 2b0c09e07725..16534d73a64f 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotResource.cs @@ -21,7 +21,7 @@ public partial class Sample_BotResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/UpdateBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/UpdateBot.json // this example is just showing the usage of "Bots_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -84,7 +84,7 @@ public async Task Update_UpdateBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeleteBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DeleteBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DeleteBot.json // this example is just showing the usage of "Bots_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -111,7 +111,7 @@ public async Task Delete_DeleteBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetBot() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetBot.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetBot.json // this example is just showing the usage of "Bots_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -142,7 +142,7 @@ public async Task Get_GetBot() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBots_ListBotsBySubscription() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListBotsBySubscription.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListBotsBySubscription.json // this example is just showing the usage of "Bots_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetBots_ListBotsBySubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckBotServiceNameAvailability_CheckNameAvailability() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/CheckNameAvailability.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/CheckNameAvailability.json // this example is just showing the usage of "Bots_GetCheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -202,7 +202,7 @@ public async Task CheckBotServiceNameAvailability_CheckNameAvailability() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBotChannelWithRegenerateKeys_RegenerateKeysForDirectLineChannelSite() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DirectlineRegenerateKeys.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DirectlineRegenerateKeys.json // this example is just showing the usage of "DirectLine_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -235,7 +235,7 @@ public async Task GetBotChannelWithRegenerateKeys_RegenerateKeysForDirectLineCha [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBotChannelWithRegenerateKeys_RegenerateKeysForWebChatChannelSite() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/WebChatRegenerateKeys.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/WebChatRegenerateKeys.json // this example is just showing the usage of "DirectLine_RegenerateKeys" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -268,7 +268,7 @@ public async Task GetBotChannelWithRegenerateKeys_RegenerateKeysForWebChatChanne [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateEmailSignInUri_CreateUrl() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/CreateEmailSignInUrl.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/CreateEmailSignInUrl.json // this example is just showing the usage of "Email_CreateSignInUrl" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -295,7 +295,7 @@ public async Task CreateEmailSignInUri_CreateUrl() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetPrivateLinkResourcesByBotResource_ListPrivateLinkResources() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListPrivateLinkResources.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListPrivateLinkResources.json // this example is just showing the usage of "PrivateLinkResources_ListByBotResource" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionCollection.cs index 2493fe55746b..23975eec19fb 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_BotServicePrivateEndpointConnectionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListPrivateEndpointConnections() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListPrivateEndpointConnections.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListPrivateEndpointConnections.json // this example is just showing the usage of "PrivateEndpointConnections_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task GetAll_ListPrivateEndpointConnections() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task Get_GetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -123,7 +123,7 @@ public async Task Exists_GetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -166,7 +166,7 @@ public async Task GetIfExists_GetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_PutPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionResource.cs index 888b1a10698f..4ef7d4afe40d 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_BotServicePrivateEndpointConnectionResource.cs @@ -20,7 +20,7 @@ public partial class Sample_BotServicePrivateEndpointConnectionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task Get_GetPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_PutPrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/PutPrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/PutPrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -93,7 +93,7 @@ public async Task Update_PutPrivateEndpointConnection() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_DeletePrivateEndpointConnection() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/DeletePrivateEndpointConnection.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/DeletePrivateEndpointConnection.json // this example is just showing the usage of "PrivateEndpointConnections_Delete" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..e65c432d5c42 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.BotService.Samples +{ + public partial class Sample_NetworkSecurityPerimeterConfigurationCollection + { + // Get Network Security Perimeter Configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetNetworkSecurityPerimeterConfiguration() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetNetworkSecurityPerimeterConfiguration.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BotResource created on azure + // for more information of creating BotResource, please refer to the document of BotResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + ResourceIdentifier botResourceId = BotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + BotResource bot = client.GetBotResource(botResourceId); + + // get the collection of this NetworkSecurityPerimeterConfigurationResource + NetworkSecurityPerimeterConfigurationCollection collection = bot.GetNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string networkSecurityPerimeterConfigurationName = "00000000-0000-0000-0000-000000000000.associationName"; + NetworkSecurityPerimeterConfigurationResource result = await collection.GetAsync(networkSecurityPerimeterConfigurationName); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Get Network Security Perimeter Configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Exists_GetNetworkSecurityPerimeterConfiguration() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetNetworkSecurityPerimeterConfiguration.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BotResource created on azure + // for more information of creating BotResource, please refer to the document of BotResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + ResourceIdentifier botResourceId = BotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + BotResource bot = client.GetBotResource(botResourceId); + + // get the collection of this NetworkSecurityPerimeterConfigurationResource + NetworkSecurityPerimeterConfigurationCollection collection = bot.GetNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string networkSecurityPerimeterConfigurationName = "00000000-0000-0000-0000-000000000000.associationName"; + bool result = await collection.ExistsAsync(networkSecurityPerimeterConfigurationName); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Get Network Security Perimeter Configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetIfExists_GetNetworkSecurityPerimeterConfiguration() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetNetworkSecurityPerimeterConfiguration.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BotResource created on azure + // for more information of creating BotResource, please refer to the document of BotResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + ResourceIdentifier botResourceId = BotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + BotResource bot = client.GetBotResource(botResourceId); + + // get the collection of this NetworkSecurityPerimeterConfigurationResource + NetworkSecurityPerimeterConfigurationCollection collection = bot.GetNetworkSecurityPerimeterConfigurations(); + + // invoke the operation + string networkSecurityPerimeterConfigurationName = "00000000-0000-0000-0000-000000000000.associationName"; + NullableResponse response = await collection.GetIfExistsAsync(networkSecurityPerimeterConfigurationName); + NetworkSecurityPerimeterConfigurationResource result = response.HasValue ? response.Value : null; + + if (result == null) + { + Console.WriteLine($"Succeeded with null as result"); + } + else + { + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } + + // List Network Security Perimeter Configurations + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task GetAll_ListNetworkSecurityPerimeterConfigurations() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListNetworkSecurityPerimeterConfigurations.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_List" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this BotResource created on azure + // for more information of creating BotResource, please refer to the document of BotResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + ResourceIdentifier botResourceId = BotResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); + BotResource bot = client.GetBotResource(botResourceId); + + // get the collection of this NetworkSecurityPerimeterConfigurationResource + NetworkSecurityPerimeterConfigurationCollection collection = bot.GetNetworkSecurityPerimeterConfigurations(); + + // invoke the operation and iterate over the result + await foreach (NetworkSecurityPerimeterConfigurationResource item in collection.GetAllAsync()) + { + // the variable item is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = item.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + Console.WriteLine($"Succeeded"); + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..c6d64ac31ebe --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_NetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; + +namespace Azure.ResourceManager.BotService.Samples +{ + public partial class Sample_NetworkSecurityPerimeterConfigurationResource + { + // Get Network Security Perimeter Configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Get_GetNetworkSecurityPerimeterConfiguration() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetNetworkSecurityPerimeterConfiguration.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Get" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating NetworkSecurityPerimeterConfigurationResource, please refer to the document of NetworkSecurityPerimeterConfigurationResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + string networkSecurityPerimeterConfigurationName = "00000000-0000-0000-0000-000000000000.associationName"; + ResourceIdentifier networkSecurityPerimeterConfigurationResourceId = NetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + NetworkSecurityPerimeterConfigurationResource networkSecurityPerimeterConfiguration = client.GetNetworkSecurityPerimeterConfigurationResource(networkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + NetworkSecurityPerimeterConfigurationResource result = await networkSecurityPerimeterConfiguration.GetAsync(); + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + + // Reconcile Network Security Perimeter Configuration + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task Reconcile_ReconcileNetworkSecurityPerimeterConfiguration() + { + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ReconcileNetworkSecurityPerimeterConfiguration.json + // this example is just showing the usage of "NetworkSecurityPerimeterConfigurations_Reconcile" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this NetworkSecurityPerimeterConfigurationResource created on azure + // for more information of creating NetworkSecurityPerimeterConfigurationResource, please refer to the document of NetworkSecurityPerimeterConfigurationResource + string subscriptionId = "subId"; + string resourceGroupName = "rgName"; + string resourceName = "botId"; + string networkSecurityPerimeterConfigurationName = "00000000-0000-0000-0000-000000000000.associationName"; + ResourceIdentifier networkSecurityPerimeterConfigurationResourceId = NetworkSecurityPerimeterConfigurationResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + NetworkSecurityPerimeterConfigurationResource networkSecurityPerimeterConfiguration = client.GetNetworkSecurityPerimeterConfigurationResource(networkSecurityPerimeterConfigurationResourceId); + + // invoke the operation + ArmOperation lro = await networkSecurityPerimeterConfiguration.ReconcileAsync(WaitUntil.Completed); + NetworkSecurityPerimeterConfigurationResource result = lro.Value; + + // the variable result is a resource, you could call other operations on this instance as well + // but just for demo, we get its data from this resource instance + NetworkSecurityPerimeterConfigurationData resourceData = result.Data; + // for demo we just print out the id + Console.WriteLine($"Succeeded on id: {resourceData.Id}"); + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs index bb8c5a2aaf4a..b310bdd58ea9 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionResourceExtensions [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBotServiceQnAMakerEndpointKey_ListQnAMakerEndpointKeys() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/ListQnAMakerEndpointKeys.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/ListQnAMakerEndpointKeys.json // this example is just showing the usage of "QnAMakerEndpointKeys_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -51,7 +51,7 @@ public async Task GetBotServiceQnAMakerEndpointKey_ListQnAMakerEndpointKeys() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetBotServiceHostSettings_GetBotHostSettings() { - // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/stable/2022-09-15/examples/GetHostSettings.json + // Generated from example definition: specification/botservice/resource-manager/Microsoft.BotService/preview/2023-09-15-preview/examples/GetHostSettings.json // this example is just showing the usage of "HostSettings_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/ArmBotServiceModelFactory.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/ArmBotServiceModelFactory.cs index cfb71b347d72..6cd535a71c72 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/ArmBotServiceModelFactory.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/ArmBotServiceModelFactory.cs @@ -7,9 +7,11 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; +using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.BotService.Models { @@ -81,12 +83,13 @@ public static BotData BotData(ResourceIdentifier id = null, string name = null, /// The channel schema transformation version for the bot. /// The storage resourceId for the bot. /// List of Private Endpoint Connections configured for the bot. + /// List of Network Security Perimeter configurations for the bot. /// The hint to browser (e.g. protocol handler) on how to open the bot for authoring. /// The hint (e.g. keyVault secret resourceId) on how to fetch the app secret. /// Provisioning state of the resource. /// Publishing credentials of the resource. /// A new instance for mocking. - public static BotProperties BotProperties(string displayName = null, string description = null, Uri iconUri = null, Uri endpoint = null, string endpointVersion = null, IDictionary allSettings = null, IDictionary parameters = null, Uri manifestUri = null, BotMsaAppType? msaAppType = null, string msaAppId = null, string msaAppTenantId = null, ResourceIdentifier msaAppMSIResourceId = null, IEnumerable configuredChannels = null, IEnumerable enabledChannels = null, string developerAppInsightKey = null, string developerAppInsightsApiKey = null, string developerAppInsightsApplicationId = null, IEnumerable luisAppIds = null, string luisKey = null, bool? isCmekEnabled = null, Uri cmekKeyVaultUri = null, string cmekEncryptionStatus = null, Guid? tenantId = null, BotServicePublicNetworkAccess? publicNetworkAccess = null, bool? isStreamingSupported = null, bool? isDeveloperAppInsightsApiKeySet = null, string migrationToken = null, bool? isLocalAuthDisabled = null, string schemaTransformationVersion = null, ResourceIdentifier storageResourceId = null, IEnumerable privateEndpointConnections = null, string openWithHint = null, string appPasswordHint = null, string provisioningState = null, string publishingCredentials = null) + public static BotProperties BotProperties(string displayName = null, string description = null, Uri iconUri = null, Uri endpoint = null, string endpointVersion = null, IDictionary allSettings = null, IDictionary parameters = null, Uri manifestUri = null, BotMsaAppType? msaAppType = null, string msaAppId = null, string msaAppTenantId = null, ResourceIdentifier msaAppMSIResourceId = null, IEnumerable configuredChannels = null, IEnumerable enabledChannels = null, string developerAppInsightKey = null, string developerAppInsightsApiKey = null, string developerAppInsightsApplicationId = null, IEnumerable luisAppIds = null, string luisKey = null, bool? isCmekEnabled = null, Uri cmekKeyVaultUri = null, string cmekEncryptionStatus = null, Guid? tenantId = null, BotServicePublicNetworkAccess? publicNetworkAccess = null, bool? isStreamingSupported = null, bool? isDeveloperAppInsightsApiKeySet = null, string migrationToken = null, bool? isLocalAuthDisabled = null, string schemaTransformationVersion = null, ResourceIdentifier storageResourceId = null, IEnumerable privateEndpointConnections = null, IEnumerable networkSecurityPerimeterConfigurations = null, string openWithHint = null, string appPasswordHint = null, string provisioningState = null, string publishingCredentials = null) { allSettings ??= new Dictionary(); parameters ??= new Dictionary(); @@ -94,6 +97,7 @@ public static BotProperties BotProperties(string displayName = null, string desc enabledChannels ??= new List(); luisAppIds ??= new List(); privateEndpointConnections ??= new List(); + networkSecurityPerimeterConfigurations ??= new List(); return new BotProperties( displayName, @@ -127,6 +131,7 @@ public static BotProperties BotProperties(string displayName = null, string desc schemaTransformationVersion, storageResourceId, privateEndpointConnections?.ToList(), + networkSecurityPerimeterConfigurations?.ToList(), openWithHint, appPasswordHint, provisioningState, @@ -160,6 +165,152 @@ public static BotServicePrivateEndpointConnectionData BotServicePrivateEndpointC serializedAdditionalRawData: null); } + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Network Security Perimeter configuration. + /// A new instance for mocking. + public static NetworkSecurityPerimeterConfigurationData NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, NetworkSecurityPerimeterConfigurationProperties properties = null) + { + return new NetworkSecurityPerimeterConfigurationData( + id, + name, + resourceType, + systemData, + properties, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// + /// List of Provisioning Issues if any. + /// Information about Network Security Perimeter. + /// Information about resource association. + /// Information about profile. + /// A new instance for mocking. + public static NetworkSecurityPerimeterConfigurationProperties NetworkSecurityPerimeterConfigurationProperties(ProvisioningState? provisioningState = null, IEnumerable provisioningIssues = null, NetworkSecurityPerimeter networkSecurityPerimeter = null, ResourceAssociation resourceAssociation = null, Profile profile = null) + { + provisioningIssues ??= new List(); + + return new NetworkSecurityPerimeterConfigurationProperties( + provisioningState, + provisioningIssues?.ToList(), + networkSecurityPerimeter, + resourceAssociation, + profile, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the issue. + /// Properties of Provisioning Issue. + /// A new instance for mocking. + public static ProvisioningIssue ProvisioningIssue(string name = null, ProvisioningIssueProperties properties = null) + { + return new ProvisioningIssue(name, properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Type of Issue. + /// Provisioning state of Network Security Perimeter configuration propagation. + /// Description of the issue. + /// ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + /// Access rules that can be added to the same profile to remediate the issue. + /// A new instance for mocking. + public static ProvisioningIssueProperties ProvisioningIssueProperties(string issueType = null, Severity? severity = null, string description = null, IEnumerable suggestedResourceIds = null, IEnumerable suggestedAccessRules = null) + { + suggestedResourceIds ??= new List(); + suggestedAccessRules ??= new List(); + + return new ProvisioningIssueProperties( + issueType, + severity, + description, + suggestedResourceIds?.ToList(), + suggestedAccessRules?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the access rule. + /// Properties of Access Rule. + /// A new instance for mocking. + public static NspAccessRule NspAccessRule(string name = null, NspAccessRuleProperties properties = null) + { + return new NspAccessRule(name, properties, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Direction of Access Rule. + /// Address prefixes in the CIDR format for inbound rules. + /// Subscriptions for inbound rules. + /// NetworkSecurityPerimeters for inbound rules. + /// FQDN for outbound rules. + /// Email addresses for outbound rules. + /// Phone numbers for outbound rules. + /// A new instance for mocking. + public static NspAccessRuleProperties NspAccessRuleProperties(NspAccessRuleDirection? direction = null, IEnumerable addressPrefixes = null, IEnumerable subscriptions = null, IEnumerable networkSecurityPerimeters = null, IEnumerable fullyQualifiedDomainNames = null, IEnumerable emailAddresses = null, IEnumerable phoneNumbers = null) + { + addressPrefixes ??= new List(); + subscriptions ??= new List(); + networkSecurityPerimeters ??= new List(); + fullyQualifiedDomainNames ??= new List(); + emailAddresses ??= new List(); + phoneNumbers ??= new List(); + + return new NspAccessRuleProperties( + direction, + addressPrefixes?.ToList(), + subscriptions?.ToList(), + networkSecurityPerimeters?.ToList(), + fullyQualifiedDomainNames?.ToList(), + emailAddresses?.ToList(), + phoneNumbers?.ToList(), + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + /// Guid of the Network Security Perimeter. + /// Location of the Network Security Perimeter. + /// A new instance for mocking. + public static NetworkSecurityPerimeter NetworkSecurityPerimeter(ResourceIdentifier id = null, string perimeterGuid = null, AzureLocation? location = null) + { + return new NetworkSecurityPerimeter(id, perimeterGuid, location, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the resource association. + /// Access Mode of the resource association. + /// A new instance for mocking. + public static ResourceAssociation ResourceAssociation(string name = null, AccessMode? accessMode = null) + { + return new ResourceAssociation(name, accessMode, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Name of the profile. + /// Current access rules version. + /// List of Access Rules. + /// Current diagnostic settings version. + /// List of log categories. + /// A new instance for mocking. + public static Profile Profile(string name = null, long? accessRulesVersion = null, IEnumerable accessRules = null, long? diagnosticSettingsVersion = null, IEnumerable enabledLogCategories = null) + { + accessRules ??= new List(); + enabledLogCategories ??= new List(); + + return new Profile( + name, + accessRulesVersion, + accessRules?.ToList(), + diagnosticSettingsVersion, + enabledLogCategories?.ToList(), + serializedAdditionalRawData: null); + } + /// Initializes a new instance of . /// The sku name. /// Gets the sku tier. This is based on the SKU name. @@ -433,6 +584,8 @@ public static BotConnectionSettingData BotConnectionSettingData(ResourceIdentifi } /// Initializes a new instance of . + /// Id of the Connection Setting. + /// Name of the Connection Setting. /// Client Id associated with the Connection Setting. /// Setting Id set by the service for the Connection Setting. /// Client Secret associated with the Connection Setting. @@ -442,11 +595,13 @@ public static BotConnectionSettingData BotConnectionSettingData(ResourceIdentifi /// Service Provider Parameters associated with the Connection Setting. /// Provisioning state of the resource. /// A new instance for mocking. - public static BotConnectionSettingProperties BotConnectionSettingProperties(string clientId = null, string settingId = null, string clientSecret = null, string scopes = null, string serviceProviderId = null, string serviceProviderDisplayName = null, IEnumerable parameters = null, string provisioningState = null) + public static BotConnectionSettingProperties BotConnectionSettingProperties(string id = null, string name = null, string clientId = null, string settingId = null, string clientSecret = null, string scopes = null, string serviceProviderId = null, string serviceProviderDisplayName = null, IEnumerable parameters = null, string provisioningState = null) { parameters ??= new List(); return new BotConnectionSettingProperties( + id, + name, clientId, settingId, clientSecret, @@ -986,5 +1141,64 @@ public static M365Extensions M365Extensions(ETag? etag = null, string provisioni { return new M365Extensions("M365Extensions", etag, provisioningState, location, serializedAdditionalRawData: null); } + + /// Initializes a new instance of BotProperties. + /// The Name of the bot. + /// The description of the bot. + /// The Icon Url of the bot. + /// The bot's endpoint. + /// The bot's endpoint version. + /// Contains resource all settings defined as key/value pairs. + /// Contains resource parameters defined as key/value pairs. + /// The bot's manifest url. + /// Microsoft App Type for the bot. + /// Microsoft App Id for the bot. + /// Microsoft App Tenant Id for the bot. + /// Microsoft App Managed Identity Resource Id for the bot. + /// Collection of channels for which the bot is configured. + /// Collection of channels for which the bot is enabled. + /// The Application Insights key. + /// The Application Insights Api Key. + /// The Application Insights App Id. + /// Collection of LUIS App Ids. + /// The LUIS Key. + /// Whether Cmek is enabled. + /// The CMK Url. + /// The CMK encryption status. + /// The Tenant Id for the bot. + /// Whether the bot is in an isolated network. + /// Whether the bot is streaming supported. + /// Whether the bot is developerAppInsightsApiKey set. + /// Token used to migrate non Azure bot to azure subscription. + /// Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. + /// The channel schema transformation version for the bot. + /// The storage resourceId for the bot. + /// List of Private Endpoint Connections configured for the bot. + /// The hint to browser (e.g. protocol handler) on how to open the bot for authoring. + /// The hint (e.g. keyVault secret resourceId) on how to fetch the app secret. + /// Provisioning state of the resource. + /// Publishing credentials of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static BotProperties BotProperties(string displayName, string description, Uri iconUri, Uri endpoint, string endpointVersion, IDictionary allSettings, IDictionary parameters, Uri manifestUri, BotMsaAppType? msaAppType, string msaAppId, string msaAppTenantId, ResourceIdentifier msaAppMSIResourceId, IEnumerable configuredChannels, IEnumerable enabledChannels, string developerAppInsightKey, string developerAppInsightsApiKey, string developerAppInsightsApplicationId, IEnumerable luisAppIds, string luisKey, bool? isCmekEnabled, Uri cmekKeyVaultUri, string cmekEncryptionStatus, Guid? tenantId, BotServicePublicNetworkAccess? publicNetworkAccess, bool? isStreamingSupported, bool? isDeveloperAppInsightsApiKeySet, string migrationToken, bool? isLocalAuthDisabled, string schemaTransformationVersion, ResourceIdentifier storageResourceId, IEnumerable privateEndpointConnections, string openWithHint, string appPasswordHint, string provisioningState, string publishingCredentials) + { + return BotProperties(displayName: displayName, description: description, iconUri: iconUri, endpoint: endpoint, endpointVersion: endpointVersion, allSettings: allSettings, parameters: parameters, manifestUri: manifestUri, msaAppType: msaAppType, msaAppId: msaAppId, msaAppTenantId: msaAppTenantId, msaAppMSIResourceId: msaAppMSIResourceId, configuredChannels: configuredChannels, enabledChannels: enabledChannels, developerAppInsightKey: developerAppInsightKey, developerAppInsightsApiKey: developerAppInsightsApiKey, developerAppInsightsApplicationId: developerAppInsightsApplicationId, luisAppIds: luisAppIds, luisKey: luisKey, isCmekEnabled: isCmekEnabled, cmekKeyVaultUri: cmekKeyVaultUri, cmekEncryptionStatus: cmekEncryptionStatus, tenantId: tenantId, publicNetworkAccess: publicNetworkAccess, isStreamingSupported: isStreamingSupported, isDeveloperAppInsightsApiKeySet: isDeveloperAppInsightsApiKeySet, migrationToken: migrationToken, isLocalAuthDisabled: isLocalAuthDisabled, schemaTransformationVersion: schemaTransformationVersion, storageResourceId: storageResourceId, privateEndpointConnections: privateEndpointConnections, networkSecurityPerimeterConfigurations: default, openWithHint: openWithHint, appPasswordHint: appPasswordHint, provisioningState: provisioningState, publishingCredentials: publishingCredentials); + } + + /// Initializes a new instance of BotConnectionSettingProperties. + /// Client Id associated with the Connection Setting. + /// Setting Id set by the service for the Connection Setting. + /// Client Secret associated with the Connection Setting. + /// Scopes associated with the Connection Setting. + /// Service Provider Id associated with the Connection Setting. + /// Service Provider Display Name associated with the Connection Setting. + /// Service Provider Parameters associated with the Connection Setting. + /// Provisioning state of the resource. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static BotConnectionSettingProperties BotConnectionSettingProperties(string clientId, string settingId, string clientSecret, string scopes, string serviceProviderId, string serviceProviderDisplayName, IEnumerable parameters, string provisioningState) + { + return BotConnectionSettingProperties(id: default, name: default, clientId: clientId, settingId: settingId, clientSecret: clientSecret, scopes: scopes, serviceProviderId: serviceProviderId, serviceProviderDisplayName: serviceProviderDisplayName, parameters: parameters, provisioningState: provisioningState); + } } } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelCollection.cs index 34b0627e8819..d2d32fd7e11d 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpdateAsync( /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUnt /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -204,7 +204,7 @@ public virtual async Task> GetAsync(BotChannelName /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -245,7 +245,7 @@ public virtual Response Get(BotChannelName channelName, Canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -275,7 +275,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken c /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -305,7 +305,7 @@ public virtual Pageable GetAll(CancellationToken cancellatio /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -344,7 +344,7 @@ public virtual async Task> ExistsAsync(BotChannelName channelName /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -383,7 +383,7 @@ public virtual Response Exists(BotChannelName channelName, CancellationTok /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -424,7 +424,7 @@ public virtual async Task> GetIfExistsAsync /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.cs index fd3c52eaa023..131929cbc9d5 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotChannelResource.cs @@ -103,7 +103,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> GetAsync(CancellationTok /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual Response Get(CancellationToken cancellationTo /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -227,7 +227,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -271,7 +271,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -313,7 +313,7 @@ public virtual async Task> UpdateAsync(BotChannelDa /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -355,7 +355,7 @@ public virtual Response Update(BotChannelData data, Cancella /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -393,7 +393,7 @@ public virtual async Task> GetChannelWithK /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -431,7 +431,7 @@ public virtual Response GetChannelWithKeys(Cancella /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -493,7 +493,7 @@ public virtual async Task> AddTagAsync(string key, /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -555,7 +555,7 @@ public virtual Response AddTag(string key, string value, Can /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -612,7 +612,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -669,7 +669,7 @@ public virtual Response SetTags(IDictionary /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -729,7 +729,7 @@ public virtual async Task> RemoveTagAsync(string ke /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotCollection.cs index 1b6c5155c078..b036c4c3a0e5 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -116,7 +116,7 @@ public virtual async Task> CreateOrUpdateAsync(WaitUnt /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -167,7 +167,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, str /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> GetAsync(string resourceName, C /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual Response Get(string resourceName, CancellationToken /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -287,7 +287,7 @@ public virtual AsyncPageable GetAllAsync(CancellationToken cancella /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string resourceName, Cance /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string resourceName, CancellationToken canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfExistsAsync(string /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingCollection.cs index 53b4b881c2e2..76c1f2dfdafd 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUp /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnt /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(strin /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string connectionName, /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellat /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken c /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string connectionName, Can /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string connectionName, CancellationToken ca /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfE /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.cs index 99bf5954c4cd..10af6c37d4ef 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotConnectionSettingResource.cs @@ -102,7 +102,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -142,7 +142,7 @@ public virtual async Task> GetAsync(Cance /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual Response Get(CancellationToken canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -270,7 +270,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -312,7 +312,7 @@ public virtual async Task> UpdateAsync(Bo /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -354,7 +354,7 @@ public virtual Response Update(BotConnectionSettin /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -392,7 +392,7 @@ public virtual async Task> GetWithSecrets /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -430,7 +430,7 @@ public virtual Response GetWithSecrets(Cancellatio /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -492,7 +492,7 @@ public virtual async Task> AddTagAsync(st /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -554,7 +554,7 @@ public virtual Response AddTag(string key, string /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -611,7 +611,7 @@ public virtual async Task> SetTagsAsync(I /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -668,7 +668,7 @@ public virtual Response SetTags(IDictionary /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -728,7 +728,7 @@ public virtual async Task> RemoveTagAsync /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.cs index 46239c8b13c4..aa71f8018b45 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotResource.cs @@ -123,7 +123,7 @@ public virtual BotChannelCollection GetBotChannels() /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -152,7 +152,7 @@ public virtual async Task> GetBotChannelAsync(BotCh /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -188,7 +188,7 @@ public virtual BotConnectionSettingCollection GetBotConnectionSettings() /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -219,7 +219,7 @@ public virtual async Task> GetBotConnecti /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual BotServicePrivateEndpointConnectionCollection GetBotServicePrivat /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -288,7 +288,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -306,6 +306,75 @@ public virtual Response GetBotServi return GetBotServicePrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } + /// Gets a collection of NetworkSecurityPerimeterConfigurationResources in the Bot. + /// An object representing collection of NetworkSecurityPerimeterConfigurationResources and their operations over a NetworkSecurityPerimeterConfigurationResource. + public virtual NetworkSecurityPerimeterConfigurationCollection GetNetworkSecurityPerimeterConfigurations() + { + return GetCachedClient(client => new NetworkSecurityPerimeterConfigurationCollection(client, Id)); + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual async Task> GetNetworkSecurityPerimeterConfigurationAsync(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + return await GetNetworkSecurityPerimeterConfigurations().GetAsync(networkSecurityPerimeterConfigurationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is null. + /// is an empty string, and was expected to be non-empty. + [ForwardsClientCalls] + public virtual Response GetNetworkSecurityPerimeterConfiguration(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + return GetNetworkSecurityPerimeterConfigurations().Get(networkSecurityPerimeterConfigurationName, cancellationToken); + } + /// /// Returns a BotService specified by the parameters. /// @@ -319,7 +388,7 @@ public virtual Response GetBotServi /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -359,7 +428,7 @@ public virtual async Task> GetAsync(CancellationToken canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -399,7 +468,7 @@ public virtual Response Get(CancellationToken cancellationToken = d /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -443,7 +512,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -487,7 +556,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -529,7 +598,7 @@ public virtual async Task> UpdateAsync(BotData data, Cance /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -571,7 +640,7 @@ public virtual Response Update(BotData data, CancellationToken canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -610,7 +679,7 @@ public virtual async Task> GetBotChannelWithRegener /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -649,7 +718,7 @@ public virtual Response GetBotChannelWithRegenerateKeys(Rege /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -683,7 +752,7 @@ public virtual async Task> CreateEmailSi /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -717,7 +786,7 @@ public virtual Response CreateEmailSignInUri(Canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -742,7 +811,7 @@ public virtual AsyncPageable GetPrivateLinkRe /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -767,7 +836,7 @@ public virtual Pageable GetPrivateLinkResourc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -829,7 +898,7 @@ public virtual async Task> AddTagAsync(string key, string /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -891,7 +960,7 @@ public virtual Response AddTag(string key, string value, Cancellati /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -948,7 +1017,7 @@ public virtual async Task> SetTagsAsync(IDictionary /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -1005,7 +1074,7 @@ public virtual Response SetTags(IDictionary tags, C /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -1065,7 +1134,7 @@ public virtual async Task> RemoveTagAsync(string key, Canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionCollection.cs index ff1151487764..021432182357 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionCollection.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateO /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAll /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -314,7 +314,7 @@ public virtual Pageable GetAll(Canc /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -357,7 +357,7 @@ public virtual async Task> ExistsAsync(string privateEndpointConn /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -400,7 +400,7 @@ public virtual Response Exists(string privateEndpointConnectionName, Cance /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -445,7 +445,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.cs index f401e9c22ca5..e0de73f7d6aa 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/BotServicePrivateEndpointConnectionResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(Cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task DeleteAsync(WaitUntil waitUntil, Cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -269,7 +269,7 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual async Task /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/BotServiceExtensions.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/BotServiceExtensions.cs index b14ede76d989..2c28c79a5202 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/BotServiceExtensions.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/BotServiceExtensions.cs @@ -114,6 +114,25 @@ public static BotServicePrivateEndpointConnectionResource GetBotServicePrivateEn return GetMockableBotServiceArmClient(client).GetBotServicePrivateEndpointConnectionResource(id); } + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// is null. + /// Returns a object. + public static NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(this ArmClient client, ResourceIdentifier id) + { + Argument.AssertNotNull(client, nameof(client)); + + return GetMockableBotServiceArmClient(client).GetNetworkSecurityPerimeterConfigurationResource(id); + } + /// /// Gets a collection of BotResources in the ResourceGroupResource. /// @@ -144,7 +163,7 @@ public static BotCollection GetBots(this ResourceGroupResource resourceGroupReso /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -182,7 +201,7 @@ public static async Task> GetBotAsync(this ResourceGroupRe /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -220,7 +239,7 @@ public static Response GetBot(this ResourceGroupResource resourceGr /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -256,7 +275,7 @@ public static AsyncPageable GetBotsAsync(this SubscriptionResource /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -292,7 +311,7 @@ public static Pageable GetBots(this SubscriptionResource subscripti /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -328,7 +347,7 @@ public static AsyncPageable GetBotConnectionServiceProviders /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -364,7 +383,7 @@ public static Pageable GetBotConnectionServiceProviders(this /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -396,7 +415,7 @@ public static async Task> GetBo /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -428,7 +447,7 @@ public static Response GetBotServiceQnAM /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -459,7 +478,7 @@ public static async Task> GetBotServiceHo /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -490,7 +509,7 @@ public static Response GetBotServiceHostSettings(t /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -526,7 +545,7 @@ public static async Task> CheckBotSer /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceArmClient.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceArmClient.cs index ca1e2010df63..5eb5c1be246e 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceArmClient.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceArmClient.cs @@ -81,5 +81,17 @@ public virtual BotServicePrivateEndpointConnectionResource GetBotServicePrivateE BotServicePrivateEndpointConnectionResource.ValidateResourceId(id); return new BotServicePrivateEndpointConnectionResource(Client, id); } + + /// + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. + /// + /// The resource ID of the resource to get. + /// Returns a object. + public virtual NetworkSecurityPerimeterConfigurationResource GetNetworkSecurityPerimeterConfigurationResource(ResourceIdentifier id) + { + NetworkSecurityPerimeterConfigurationResource.ValidateResourceId(id); + return new NetworkSecurityPerimeterConfigurationResource(Client, id); + } } } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceResourceGroupResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceResourceGroupResource.cs index b3cfa9bccaef..f231b98eb0c6 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceResourceGroupResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceResourceGroupResource.cs @@ -53,7 +53,7 @@ public virtual BotCollection GetBots() /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -84,7 +84,7 @@ public virtual async Task> GetBotAsync(string resourceName /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceSubscriptionResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceSubscriptionResource.cs index ec75a63e4927..b3fb0878b6c5 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceSubscriptionResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceSubscriptionResource.cs @@ -67,7 +67,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -97,7 +97,7 @@ public virtual AsyncPageable GetBotsAsync(CancellationToken cancell /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -127,7 +127,7 @@ public virtual Pageable GetBots(CancellationToken cancellationToken /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -156,7 +156,7 @@ public virtual AsyncPageable GetBotConnectionServiceProvider /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -185,7 +185,7 @@ public virtual Pageable GetBotConnectionServiceProviders(Can /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -223,7 +223,7 @@ public virtual async Task> GetB /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -261,7 +261,7 @@ public virtual Response GetBotServiceQnA /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// @@ -295,7 +295,7 @@ public virtual async Task> GetBotServiceH /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceTenantResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceTenantResource.cs index 3f3e81f37315..5b4afb64eaa3 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceTenantResource.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Extensions/MockableBotServiceTenantResource.cs @@ -54,7 +54,7 @@ private string GetApiVersionOrNull(ResourceType resourceType) /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource @@ -96,7 +96,7 @@ public virtual async Task> CheckBotSe /// /// /// Default Api Version - /// 2022-09-15 + /// 2023-09-15-preview /// /// /// Resource diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationOperationSource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationOperationSource.cs new file mode 100644 index 000000000000..56c000603769 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/LongRunningOperation/NetworkSecurityPerimeterConfigurationOperationSource.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; + +namespace Azure.ResourceManager.BotService +{ + internal class NetworkSecurityPerimeterConfigurationOperationSource : IOperationSource + { + private readonly ArmClient _client; + + internal NetworkSecurityPerimeterConfigurationOperationSource(ArmClient client) + { + _client = client; + } + + NetworkSecurityPerimeterConfigurationResource IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return new NetworkSecurityPerimeterConfigurationResource(_client, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return new NetworkSecurityPerimeterConfigurationResource(_client, data); + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/AccessMode.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/AccessMode.cs new file mode 100644 index 000000000000..66c556fe2964 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/AccessMode.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Access Mode of the resource association. + public readonly partial struct AccessMode : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public AccessMode(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string EnforcedValue = "Enforced"; + private const string LearningValue = "Learning"; + private const string AuditValue = "Audit"; + + /// Enforced. + public static AccessMode Enforced { get; } = new AccessMode(EnforcedValue); + /// Learning. + public static AccessMode Learning { get; } = new AccessMode(LearningValue); + /// Audit. + public static AccessMode Audit { get; } = new AccessMode(AuditValue); + /// Determines if two values are the same. + public static bool operator ==(AccessMode left, AccessMode right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(AccessMode left, AccessMode right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator AccessMode(string value) => new AccessMode(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is AccessMode other && Equals(other); + /// + public bool Equals(AccessMode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.Serialization.cs index 99cda416ac68..5a87b1a4a2bc 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.Serialization.cs @@ -26,6 +26,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod } writer.WriteStartObject(); + if (Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } if (Optional.IsDefined(ClientId)) { writer.WritePropertyName("clientId"u8); @@ -109,6 +119,8 @@ internal static BotConnectionSettingProperties DeserializeBotConnectionSettingPr { return null; } + string id = default; + string name = default; string clientId = default; string settingId = default; string clientSecret = default; @@ -121,6 +133,16 @@ internal static BotConnectionSettingProperties DeserializeBotConnectionSettingPr Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) { + if (property.NameEquals("id"u8)) + { + id = property.Value.GetString(); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } if (property.NameEquals("clientId"u8)) { clientId = property.Value.GetString(); @@ -177,6 +199,8 @@ internal static BotConnectionSettingProperties DeserializeBotConnectionSettingPr } serializedAdditionalRawData = rawDataDictionary; return new BotConnectionSettingProperties( + id, + name, clientId, settingId, clientSecret, diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.cs index 7e817b59db86..62ae66b0d931 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotConnectionSettingProperties.cs @@ -52,6 +52,8 @@ public BotConnectionSettingProperties() } /// Initializes a new instance of . + /// Id of the Connection Setting. + /// Name of the Connection Setting. /// Client Id associated with the Connection Setting. /// Setting Id set by the service for the Connection Setting. /// Client Secret associated with the Connection Setting. @@ -61,8 +63,10 @@ public BotConnectionSettingProperties() /// Service Provider Parameters associated with the Connection Setting. /// Provisioning state of the resource. /// Keeps track of any properties unknown to the library. - internal BotConnectionSettingProperties(string clientId, string settingId, string clientSecret, string scopes, string serviceProviderId, string serviceProviderDisplayName, IList parameters, string provisioningState, IDictionary serializedAdditionalRawData) + internal BotConnectionSettingProperties(string id, string name, string clientId, string settingId, string clientSecret, string scopes, string serviceProviderId, string serviceProviderDisplayName, IList parameters, string provisioningState, IDictionary serializedAdditionalRawData) { + Id = id; + Name = name; ClientId = clientId; SettingId = settingId; ClientSecret = clientSecret; @@ -74,6 +78,10 @@ internal BotConnectionSettingProperties(string clientId, string settingId, strin _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Id of the Connection Setting. + public string Id { get; set; } + /// Name of the Connection Setting. + public string Name { get; set; } /// Client Id associated with the Connection Setting. public string ClientId { get; set; } /// Setting Id set by the service for the Connection Setting. diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.Serialization.cs index a40a0fe5e402..9b5ef2716e46 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.Serialization.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.Serialization.cs @@ -218,6 +218,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOpt } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(NetworkSecurityPerimeterConfigurations)) + { + writer.WritePropertyName("networkSecurityPerimeterConfigurations"u8); + writer.WriteStartArray(); + foreach (var item in NetworkSecurityPerimeterConfigurations) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } if (Optional.IsDefined(OpenWithHint)) { writer.WritePropertyName("openWithHint"u8); @@ -307,6 +317,7 @@ internal static BotProperties DeserializeBotProperties(JsonElement element, Mode string schemaTransformationVersion = default; ResourceIdentifier storageResourceId = default; IReadOnlyList privateEndpointConnections = default; + IReadOnlyList networkSecurityPerimeterConfigurations = default; string openWithHint = default; string appPasswordHint = default; string provisioningState = default; @@ -582,6 +593,20 @@ internal static BotProperties DeserializeBotProperties(JsonElement element, Mode privateEndpointConnections = array; continue; } + if (property.NameEquals("networkSecurityPerimeterConfigurations"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(item, options)); + } + networkSecurityPerimeterConfigurations = array; + continue; + } if (property.NameEquals("openWithHint"u8)) { openWithHint = property.Value.GetString(); @@ -640,6 +665,7 @@ internal static BotProperties DeserializeBotProperties(JsonElement element, Mode schemaTransformationVersion, storageResourceId, privateEndpointConnections ?? new ChangeTrackingList(), + networkSecurityPerimeterConfigurations ?? new ChangeTrackingList(), openWithHint, appPasswordHint, provisioningState, diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.cs index a30913a988b1..e14ca9512c5a 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotProperties.cs @@ -65,6 +65,7 @@ public BotProperties(string displayName, Uri endpoint, string msaAppId) EnabledChannels = new ChangeTrackingList(); LuisAppIds = new ChangeTrackingList(); PrivateEndpointConnections = new ChangeTrackingList(); + NetworkSecurityPerimeterConfigurations = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -99,12 +100,13 @@ public BotProperties(string displayName, Uri endpoint, string msaAppId) /// The channel schema transformation version for the bot. /// The storage resourceId for the bot. /// List of Private Endpoint Connections configured for the bot. + /// List of Network Security Perimeter configurations for the bot. /// The hint to browser (e.g. protocol handler) on how to open the bot for authoring. /// The hint (e.g. keyVault secret resourceId) on how to fetch the app secret. /// Provisioning state of the resource. /// Publishing credentials of the resource. /// Keeps track of any properties unknown to the library. - internal BotProperties(string displayName, string description, Uri iconUri, Uri endpoint, string endpointVersion, IDictionary allSettings, IDictionary parameters, Uri manifestUri, BotMsaAppType? msaAppType, string msaAppId, string msaAppTenantId, ResourceIdentifier msaAppMSIResourceId, IReadOnlyList configuredChannels, IReadOnlyList enabledChannels, string developerAppInsightKey, string developerAppInsightsApiKey, string developerAppInsightsApplicationId, IList luisAppIds, string luisKey, bool? isCmekEnabled, Uri cmekKeyVaultUri, string cmekEncryptionStatus, Guid? tenantId, BotServicePublicNetworkAccess? publicNetworkAccess, bool? isStreamingSupported, bool? isDeveloperAppInsightsApiKeySet, string migrationToken, bool? isLocalAuthDisabled, string schemaTransformationVersion, ResourceIdentifier storageResourceId, IReadOnlyList privateEndpointConnections, string openWithHint, string appPasswordHint, string provisioningState, string publishingCredentials, IDictionary serializedAdditionalRawData) + internal BotProperties(string displayName, string description, Uri iconUri, Uri endpoint, string endpointVersion, IDictionary allSettings, IDictionary parameters, Uri manifestUri, BotMsaAppType? msaAppType, string msaAppId, string msaAppTenantId, ResourceIdentifier msaAppMSIResourceId, IReadOnlyList configuredChannels, IReadOnlyList enabledChannels, string developerAppInsightKey, string developerAppInsightsApiKey, string developerAppInsightsApplicationId, IList luisAppIds, string luisKey, bool? isCmekEnabled, Uri cmekKeyVaultUri, string cmekEncryptionStatus, Guid? tenantId, BotServicePublicNetworkAccess? publicNetworkAccess, bool? isStreamingSupported, bool? isDeveloperAppInsightsApiKeySet, string migrationToken, bool? isLocalAuthDisabled, string schemaTransformationVersion, ResourceIdentifier storageResourceId, IReadOnlyList privateEndpointConnections, IReadOnlyList networkSecurityPerimeterConfigurations, string openWithHint, string appPasswordHint, string provisioningState, string publishingCredentials, IDictionary serializedAdditionalRawData) { DisplayName = displayName; Description = description; @@ -137,6 +139,7 @@ internal BotProperties(string displayName, string description, Uri iconUri, Uri SchemaTransformationVersion = schemaTransformationVersion; StorageResourceId = storageResourceId; PrivateEndpointConnections = privateEndpointConnections; + NetworkSecurityPerimeterConfigurations = networkSecurityPerimeterConfigurations; OpenWithHint = openWithHint; AppPasswordHint = appPasswordHint; ProvisioningState = provisioningState; @@ -211,6 +214,8 @@ internal BotProperties() public ResourceIdentifier StorageResourceId { get; set; } /// List of Private Endpoint Connections configured for the bot. public IReadOnlyList PrivateEndpointConnections { get; } + /// List of Network Security Perimeter configurations for the bot. + public IReadOnlyList NetworkSecurityPerimeterConfigurations { get; } /// The hint to browser (e.g. protocol handler) on how to open the bot for authoring. public string OpenWithHint { get; set; } /// The hint (e.g. keyVault secret resourceId) on how to fetch the app secret. diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotServicePublicNetworkAccess.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotServicePublicNetworkAccess.cs index b82c6f1408b3..9fc785a1b9f2 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotServicePublicNetworkAccess.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/BotServicePublicNetworkAccess.cs @@ -24,11 +24,14 @@ public BotServicePublicNetworkAccess(string value) private const string EnabledValue = "Enabled"; private const string DisabledValue = "Disabled"; + private const string SecuredByPerimeterValue = "SecuredByPerimeter"; /// Enabled. public static BotServicePublicNetworkAccess Enabled { get; } = new BotServicePublicNetworkAccess(EnabledValue); /// Disabled. public static BotServicePublicNetworkAccess Disabled { get; } = new BotServicePublicNetworkAccess(DisabledValue); + /// SecuredByPerimeter. + public static BotServicePublicNetworkAccess SecuredByPerimeter { get; } = new BotServicePublicNetworkAccess(SecuredByPerimeterValue); /// Determines if two values are the same. public static bool operator ==(BotServicePublicNetworkAccess left, BotServicePublicNetworkAccess right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs new file mode 100644 index 000000000000..1a418fc66e17 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.Serialization.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class NetworkSecurityPerimeter : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(PerimeterGuid)) + { + writer.WritePropertyName("perimeterGuid"u8); + writer.WriteStringValue(PerimeterGuid); + } + if (Optional.IsDefined(Location)) + { + writer.WritePropertyName("location"u8); + writer.WriteStringValue(Location.Value); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkSecurityPerimeter IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeter(document.RootElement, options); + } + + internal static NetworkSecurityPerimeter DeserializeNetworkSecurityPerimeter(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier id = default; + string perimeterGuid = default; + AzureLocation? location = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("id"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("perimeterGuid"u8)) + { + perimeterGuid = property.Value.GetString(); + continue; + } + if (property.NameEquals("location"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + location = new AzureLocation(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeter(id, perimeterGuid, location, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeter IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkSecurityPerimeter(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeter)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.cs new file mode 100644 index 000000000000..970cc57de07f --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeter.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Information about Network Security Perimeter. + public partial class NetworkSecurityPerimeter + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeter() + { + } + + /// Initializes a new instance of . + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + /// Guid of the Network Security Perimeter. + /// Location of the Network Security Perimeter. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeter(ResourceIdentifier id, string perimeterGuid, AzureLocation? location, IDictionary serializedAdditionalRawData) + { + Id = id; + PerimeterGuid = perimeterGuid; + Location = location; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". + public ResourceIdentifier Id { get; } + /// Guid of the Network Security Perimeter. + public string PerimeterGuid { get; } + /// Location of the Network Security Perimeter. + public AzureLocation? Location { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs new file mode 100644 index 000000000000..23cab1b7bdea --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.Serialization.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + internal partial class NetworkSecurityPerimeterConfigurationList : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsCollectionDefined(Value)) + { + writer.WritePropertyName("value"u8); + writer.WriteStartArray(); + foreach (var item in Value) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NextLink)) + { + writer.WritePropertyName("nextLink"u8); + writer.WriteStringValue(NextLink); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkSecurityPerimeterConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationList DeserializeNetworkSecurityPerimeterConfigurationList(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList value = default; + string nextLink = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("value"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(item, options)); + } + value = array; + continue; + } + if (property.NameEquals("nextLink"u8)) + { + nextLink = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationList(value ?? new ChangeTrackingList(), nextLink, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationList)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs new file mode 100644 index 000000000000..add648f7e4cf --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationList.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Result of the List NetworkSecurityPerimeterConfiguration operation. + internal partial class NetworkSecurityPerimeterConfigurationList + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeterConfigurationList() + { + Value = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// A collection of Network Security Perimeter configurations. + /// Link to retrieve next page of results. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationList(IReadOnlyList value, string nextLink, IDictionary serializedAdditionalRawData) + { + Value = value; + NextLink = nextLink; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// A collection of Network Security Perimeter configurations. + public IReadOnlyList Value { get; } + /// Link to retrieve next page of results. + public string NextLink { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs new file mode 100644 index 000000000000..d7443994ad33 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.Serialization.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class NetworkSecurityPerimeterConfigurationProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ProvisioningState)) + { + writer.WritePropertyName("provisioningState"u8); + writer.WriteStringValue(ProvisioningState.Value.ToString()); + } + if (Optional.IsCollectionDefined(ProvisioningIssues)) + { + writer.WritePropertyName("provisioningIssues"u8); + writer.WriteStartArray(); + foreach (var item in ProvisioningIssues) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsDefined(NetworkSecurityPerimeter)) + { + writer.WritePropertyName("networkSecurityPerimeter"u8); + writer.WriteObjectValue(NetworkSecurityPerimeter, options); + } + if (options.Format != "W" && Optional.IsDefined(ResourceAssociation)) + { + writer.WritePropertyName("resourceAssociation"u8); + writer.WriteObjectValue(ResourceAssociation, options); + } + if (options.Format != "W" && Optional.IsDefined(Profile)) + { + writer.WritePropertyName("profile"u8); + writer.WriteObjectValue(Profile, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkSecurityPerimeterConfigurationProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationProperties(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationProperties DeserializeNetworkSecurityPerimeterConfigurationProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProvisioningState? provisioningState = default; + IReadOnlyList provisioningIssues = default; + NetworkSecurityPerimeter networkSecurityPerimeter = default; + ResourceAssociation resourceAssociation = default; + Profile profile = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("provisioningState"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + provisioningState = new ProvisioningState(property.Value.GetString()); + continue; + } + if (property.NameEquals("provisioningIssues"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ProvisioningIssue.DeserializeProvisioningIssue(item, options)); + } + provisioningIssues = array; + continue; + } + if (property.NameEquals("networkSecurityPerimeter"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + networkSecurityPerimeter = NetworkSecurityPerimeter.DeserializeNetworkSecurityPerimeter(property.Value, options); + continue; + } + if (property.NameEquals("resourceAssociation"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceAssociation = ResourceAssociation.DeserializeResourceAssociation(property.Value, options); + continue; + } + if (property.NameEquals("profile"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + profile = Profile.DeserializeProfile(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationProperties( + provisioningState, + provisioningIssues ?? new ChangeTrackingList(), + networkSecurityPerimeter, + resourceAssociation, + profile, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProperties)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkSecurityPerimeterConfigurationProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.cs new file mode 100644 index 000000000000..5dd9d308f9a1 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NetworkSecurityPerimeterConfigurationProperties.cs @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Properties of Network Security Perimeter configuration. + public partial class NetworkSecurityPerimeterConfigurationProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeterConfigurationProperties() + { + ProvisioningIssues = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// List of Provisioning Issues if any. + /// Information about Network Security Perimeter. + /// Information about resource association. + /// Information about profile. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationProperties(ProvisioningState? provisioningState, IReadOnlyList provisioningIssues, NetworkSecurityPerimeter networkSecurityPerimeter, ResourceAssociation resourceAssociation, Profile profile, IDictionary serializedAdditionalRawData) + { + ProvisioningState = provisioningState; + ProvisioningIssues = provisioningIssues; + NetworkSecurityPerimeter = networkSecurityPerimeter; + ResourceAssociation = resourceAssociation; + Profile = profile; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Gets the provisioning state. + public ProvisioningState? ProvisioningState { get; } + /// List of Provisioning Issues if any. + public IReadOnlyList ProvisioningIssues { get; } + /// Information about Network Security Perimeter. + public NetworkSecurityPerimeter NetworkSecurityPerimeter { get; } + /// Information about resource association. + public ResourceAssociation ResourceAssociation { get; } + /// Information about profile. + public Profile Profile { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.Serialization.cs new file mode 100644 index 000000000000..d353dac0e056 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class NspAccessRule : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NspAccessRule)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NspAccessRule IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NspAccessRule)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNspAccessRule(document.RootElement, options); + } + + internal static NspAccessRule DeserializeNspAccessRule(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + NspAccessRuleProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NspAccessRuleProperties.DeserializeNspAccessRuleProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NspAccessRule(name, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NspAccessRule)} does not support writing '{options.Format}' format."); + } + } + + NspAccessRule IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNspAccessRule(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NspAccessRule)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.cs new file mode 100644 index 000000000000..a82f71dc087e --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRule.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Information of Access Rule in a profile. + public partial class NspAccessRule + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NspAccessRule() + { + } + + /// Initializes a new instance of . + /// Name of the access rule. + /// Properties of Access Rule. + /// Keeps track of any properties unknown to the library. + internal NspAccessRule(string name, NspAccessRuleProperties properties, IDictionary serializedAdditionalRawData) + { + Name = name; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the access rule. + public string Name { get; } + /// Properties of Access Rule. + public NspAccessRuleProperties Properties { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleDirection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleDirection.cs new file mode 100644 index 000000000000..ab0ec9dd99a6 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleDirection.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Direction of Access Rule. + public readonly partial struct NspAccessRuleDirection : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public NspAccessRuleDirection(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string InboundValue = "Inbound"; + private const string OutboundValue = "Outbound"; + + /// Inbound. + public static NspAccessRuleDirection Inbound { get; } = new NspAccessRuleDirection(InboundValue); + /// Outbound. + public static NspAccessRuleDirection Outbound { get; } = new NspAccessRuleDirection(OutboundValue); + /// Determines if two values are the same. + public static bool operator ==(NspAccessRuleDirection left, NspAccessRuleDirection right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(NspAccessRuleDirection left, NspAccessRuleDirection right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator NspAccessRuleDirection(string value) => new NspAccessRuleDirection(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is NspAccessRuleDirection other && Equals(other); + /// + public bool Equals(NspAccessRuleDirection other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.Serialization.cs new file mode 100644 index 000000000000..db1e7311abf9 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.Serialization.cs @@ -0,0 +1,285 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class NspAccessRuleProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NspAccessRuleProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Direction)) + { + writer.WritePropertyName("direction"u8); + writer.WriteStringValue(Direction.Value.ToString()); + } + if (Optional.IsCollectionDefined(AddressPrefixes)) + { + writer.WritePropertyName("addressPrefixes"u8); + writer.WriteStartArray(); + foreach (var item in AddressPrefixes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(Subscriptions)) + { + writer.WritePropertyName("subscriptions"u8); + writer.WriteStartArray(); + foreach (var item in Subscriptions) + { + JsonSerializer.Serialize(writer, item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(NetworkSecurityPerimeters)) + { + writer.WritePropertyName("networkSecurityPerimeters"u8); + writer.WriteStartArray(); + foreach (var item in NetworkSecurityPerimeters) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(FullyQualifiedDomainNames)) + { + writer.WritePropertyName("fullyQualifiedDomainNames"u8); + writer.WriteStartArray(); + foreach (var item in FullyQualifiedDomainNames) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(EmailAddresses)) + { + writer.WritePropertyName("emailAddresses"u8); + writer.WriteStartArray(); + foreach (var item in EmailAddresses) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && Optional.IsCollectionDefined(PhoneNumbers)) + { + writer.WritePropertyName("phoneNumbers"u8); + writer.WriteStartArray(); + foreach (var item in PhoneNumbers) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NspAccessRuleProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NspAccessRuleProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNspAccessRuleProperties(document.RootElement, options); + } + + internal static NspAccessRuleProperties DeserializeNspAccessRuleProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NspAccessRuleDirection? direction = default; + IReadOnlyList addressPrefixes = default; + IReadOnlyList subscriptions = default; + IReadOnlyList networkSecurityPerimeters = default; + IReadOnlyList fullyQualifiedDomainNames = default; + IReadOnlyList emailAddresses = default; + IReadOnlyList phoneNumbers = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("direction"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + direction = new NspAccessRuleDirection(property.Value.GetString()); + continue; + } + if (property.NameEquals("addressPrefixes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + addressPrefixes = array; + continue; + } + if (property.NameEquals("subscriptions"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(JsonSerializer.Deserialize(item.GetRawText())); + } + subscriptions = array; + continue; + } + if (property.NameEquals("networkSecurityPerimeters"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NetworkSecurityPerimeter.DeserializeNetworkSecurityPerimeter(item, options)); + } + networkSecurityPerimeters = array; + continue; + } + if (property.NameEquals("fullyQualifiedDomainNames"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + fullyQualifiedDomainNames = array; + continue; + } + if (property.NameEquals("emailAddresses"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + emailAddresses = array; + continue; + } + if (property.NameEquals("phoneNumbers"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + phoneNumbers = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NspAccessRuleProperties( + direction, + addressPrefixes ?? new ChangeTrackingList(), + subscriptions ?? new ChangeTrackingList(), + networkSecurityPerimeters ?? new ChangeTrackingList(), + fullyQualifiedDomainNames ?? new ChangeTrackingList(), + emailAddresses ?? new ChangeTrackingList(), + phoneNumbers ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NspAccessRuleProperties)} does not support writing '{options.Format}' format."); + } + } + + NspAccessRuleProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNspAccessRuleProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NspAccessRuleProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.cs new file mode 100644 index 000000000000..10c07ade04ce --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/NspAccessRuleProperties.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.ResourceManager.Resources.Models; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Properties of Access Rule. + public partial class NspAccessRuleProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NspAccessRuleProperties() + { + AddressPrefixes = new ChangeTrackingList(); + Subscriptions = new ChangeTrackingList(); + NetworkSecurityPerimeters = new ChangeTrackingList(); + FullyQualifiedDomainNames = new ChangeTrackingList(); + EmailAddresses = new ChangeTrackingList(); + PhoneNumbers = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Direction of Access Rule. + /// Address prefixes in the CIDR format for inbound rules. + /// Subscriptions for inbound rules. + /// NetworkSecurityPerimeters for inbound rules. + /// FQDN for outbound rules. + /// Email addresses for outbound rules. + /// Phone numbers for outbound rules. + /// Keeps track of any properties unknown to the library. + internal NspAccessRuleProperties(NspAccessRuleDirection? direction, IReadOnlyList addressPrefixes, IReadOnlyList subscriptions, IReadOnlyList networkSecurityPerimeters, IReadOnlyList fullyQualifiedDomainNames, IReadOnlyList emailAddresses, IReadOnlyList phoneNumbers, IDictionary serializedAdditionalRawData) + { + Direction = direction; + AddressPrefixes = addressPrefixes; + Subscriptions = subscriptions; + NetworkSecurityPerimeters = networkSecurityPerimeters; + FullyQualifiedDomainNames = fullyQualifiedDomainNames; + EmailAddresses = emailAddresses; + PhoneNumbers = phoneNumbers; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Direction of Access Rule. + public NspAccessRuleDirection? Direction { get; } + /// Address prefixes in the CIDR format for inbound rules. + public IReadOnlyList AddressPrefixes { get; } + /// Subscriptions for inbound rules. + public IReadOnlyList Subscriptions { get; } + /// NetworkSecurityPerimeters for inbound rules. + public IReadOnlyList NetworkSecurityPerimeters { get; } + /// FQDN for outbound rules. + public IReadOnlyList FullyQualifiedDomainNames { get; } + /// Email addresses for outbound rules. + public IReadOnlyList EmailAddresses { get; } + /// Phone numbers for outbound rules. + public IReadOnlyList PhoneNumbers { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.Serialization.cs new file mode 100644 index 000000000000..4176a259535f --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.Serialization.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class Profile : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Profile)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AccessRulesVersion)) + { + writer.WritePropertyName("accessRulesVersion"u8); + writer.WriteNumberValue(AccessRulesVersion.Value); + } + if (Optional.IsCollectionDefined(AccessRules)) + { + writer.WritePropertyName("accessRules"u8); + writer.WriteStartArray(); + foreach (var item in AccessRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (Optional.IsDefined(DiagnosticSettingsVersion)) + { + writer.WritePropertyName("diagnosticSettingsVersion"u8); + writer.WriteNumberValue(DiagnosticSettingsVersion.Value); + } + if (options.Format != "W" && Optional.IsCollectionDefined(EnabledLogCategories)) + { + writer.WritePropertyName("enabledLogCategories"u8); + writer.WriteStartArray(); + foreach (var item in EnabledLogCategories) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + Profile IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(Profile)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProfile(document.RootElement, options); + } + + internal static Profile DeserializeProfile(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + long? accessRulesVersion = default; + IReadOnlyList accessRules = default; + long? diagnosticSettingsVersion = default; + IReadOnlyList enabledLogCategories = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessRulesVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessRulesVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("accessRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NspAccessRule.DeserializeNspAccessRule(item, options)); + } + accessRules = array; + continue; + } + if (property.NameEquals("diagnosticSettingsVersion"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diagnosticSettingsVersion = property.Value.GetInt64(); + continue; + } + if (property.NameEquals("enabledLogCategories"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + enabledLogCategories = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new Profile( + name, + accessRulesVersion, + accessRules ?? new ChangeTrackingList(), + diagnosticSettingsVersion, + enabledLogCategories ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(Profile)} does not support writing '{options.Format}' format."); + } + } + + Profile IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProfile(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(Profile)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.cs new file mode 100644 index 000000000000..d0539f9c53fd --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Profile.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Information about profile. + public partial class Profile + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal Profile() + { + AccessRules = new ChangeTrackingList(); + EnabledLogCategories = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Name of the profile. + /// Current access rules version. + /// List of Access Rules. + /// Current diagnostic settings version. + /// List of log categories. + /// Keeps track of any properties unknown to the library. + internal Profile(string name, long? accessRulesVersion, IReadOnlyList accessRules, long? diagnosticSettingsVersion, IReadOnlyList enabledLogCategories, IDictionary serializedAdditionalRawData) + { + Name = name; + AccessRulesVersion = accessRulesVersion; + AccessRules = accessRules; + DiagnosticSettingsVersion = diagnosticSettingsVersion; + EnabledLogCategories = enabledLogCategories; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the profile. + public string Name { get; } + /// Current access rules version. + public long? AccessRulesVersion { get; } + /// List of Access Rules. + public IReadOnlyList AccessRules { get; } + /// Current diagnostic settings version. + public long? DiagnosticSettingsVersion { get; } + /// List of log categories. + public IReadOnlyList EnabledLogCategories { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.Serialization.cs new file mode 100644 index 000000000000..8deecdf21c54 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class ProvisioningIssue : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProvisioningIssue)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ProvisioningIssue IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProvisioningIssue)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProvisioningIssue(document.RootElement, options); + } + + internal static ProvisioningIssue DeserializeProvisioningIssue(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + ProvisioningIssueProperties properties = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = ProvisioningIssueProperties.DeserializeProvisioningIssueProperties(property.Value, options); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProvisioningIssue(name, properties, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProvisioningIssue)} does not support writing '{options.Format}' format."); + } + } + + ProvisioningIssue IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProvisioningIssue(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProvisioningIssue)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.cs new file mode 100644 index 000000000000..1428d262b13c --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssue.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Describes Provisioning issue for given Network Security Perimeter configuration. + public partial class ProvisioningIssue + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProvisioningIssue() + { + } + + /// Initializes a new instance of . + /// Name of the issue. + /// Properties of Provisioning Issue. + /// Keeps track of any properties unknown to the library. + internal ProvisioningIssue(string name, ProvisioningIssueProperties properties, IDictionary serializedAdditionalRawData) + { + Name = name; + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the issue. + public string Name { get; } + /// Properties of Provisioning Issue. + public ProvisioningIssueProperties Properties { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs new file mode 100644 index 000000000000..7c0a1fcb6a5e --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.Serialization.cs @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class ProvisioningIssueProperties : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProvisioningIssueProperties)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IssueType)) + { + writer.WritePropertyName("issueType"u8); + writer.WriteStringValue(IssueType); + } + if (Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.Value.ToString()); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsCollectionDefined(SuggestedResourceIds)) + { + writer.WritePropertyName("suggestedResourceIds"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedResourceIds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (Optional.IsCollectionDefined(SuggestedAccessRules)) + { + writer.WritePropertyName("suggestedAccessRules"u8); + writer.WriteStartArray(); + foreach (var item in SuggestedAccessRules) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ProvisioningIssueProperties IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProvisioningIssueProperties)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProvisioningIssueProperties(document.RootElement, options); + } + + internal static ProvisioningIssueProperties DeserializeProvisioningIssueProperties(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string issueType = default; + Severity? severity = default; + string description = default; + IReadOnlyList suggestedResourceIds = default; + IReadOnlyList suggestedAccessRules = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("issueType"u8)) + { + issueType = property.Value.GetString(); + continue; + } + if (property.NameEquals("severity"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + severity = new Severity(property.Value.GetString()); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("suggestedResourceIds"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(new ResourceIdentifier(item.GetString())); + } + } + suggestedResourceIds = array; + continue; + } + if (property.NameEquals("suggestedAccessRules"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(NspAccessRule.DeserializeNspAccessRule(item, options)); + } + suggestedAccessRules = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ProvisioningIssueProperties( + issueType, + severity, + description, + suggestedResourceIds ?? new ChangeTrackingList(), + suggestedAccessRules ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ProvisioningIssueProperties)} does not support writing '{options.Format}' format."); + } + } + + ProvisioningIssueProperties IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeProvisioningIssueProperties(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProvisioningIssueProperties)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.cs new file mode 100644 index 000000000000..3197829e402e --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningIssueProperties.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Properties of Provisioning Issue. + public partial class ProvisioningIssueProperties + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ProvisioningIssueProperties() + { + SuggestedResourceIds = new ChangeTrackingList(); + SuggestedAccessRules = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Type of Issue. + /// Provisioning state of Network Security Perimeter configuration propagation. + /// Description of the issue. + /// ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + /// Access rules that can be added to the same profile to remediate the issue. + /// Keeps track of any properties unknown to the library. + internal ProvisioningIssueProperties(string issueType, Severity? severity, string description, IReadOnlyList suggestedResourceIds, IReadOnlyList suggestedAccessRules, IDictionary serializedAdditionalRawData) + { + IssueType = issueType; + Severity = severity; + Description = description; + SuggestedResourceIds = suggestedResourceIds; + SuggestedAccessRules = suggestedAccessRules; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Type of Issue. + public string IssueType { get; } + /// Provisioning state of Network Security Perimeter configuration propagation. + public Severity? Severity { get; } + /// Description of the issue. + public string Description { get; } + /// ARM IDs of resources that can be associated to the same perimeter to remediate the issue. + public IReadOnlyList SuggestedResourceIds { get; } + /// Access rules that can be added to the same profile to remediate the issue. + public IReadOnlyList SuggestedAccessRules { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningState.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningState.cs new file mode 100644 index 000000000000..4442432d2615 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ProvisioningState.cs @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.BotService.Models +{ + /// The ProvisioningState. + public readonly partial struct ProvisioningState : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatingValue = "Creating"; + private const string UpdatingValue = "Updating"; + private const string AcceptedValue = "Accepted"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string DeletingValue = "Deleting"; + + /// Creating. + public static ProvisioningState Creating { get; } = new ProvisioningState(CreatingValue); + /// Updating. + public static ProvisioningState Updating { get; } = new ProvisioningState(UpdatingValue); + /// Accepted. + public static ProvisioningState Accepted { get; } = new ProvisioningState(AcceptedValue); + /// Succeeded. + public static ProvisioningState Succeeded { get; } = new ProvisioningState(SucceededValue); + /// Failed. + public static ProvisioningState Failed { get; } = new ProvisioningState(FailedValue); + /// Deleting. + public static ProvisioningState Deleting { get; } = new ProvisioningState(DeletingValue); + /// Determines if two values are the same. + public static bool operator ==(ProvisioningState left, ProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ProvisioningState left, ProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ProvisioningState(string value) => new ProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ProvisioningState other && Equals(other); + /// + public bool Equals(ProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.Serialization.cs new file mode 100644 index 000000000000..5398fd81d96f --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.BotService.Models +{ + public partial class ResourceAssociation : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(AccessMode)) + { + writer.WritePropertyName("accessMode"u8); + writer.WriteStringValue(AccessMode.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ResourceAssociation IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeResourceAssociation(document.RootElement, options); + } + + internal static ResourceAssociation DeserializeResourceAssociation(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + AccessMode? accessMode = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("accessMode"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + accessMode = new AccessMode(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ResourceAssociation(name, accessMode, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support writing '{options.Format}' format."); + } + } + + ResourceAssociation IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeResourceAssociation(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ResourceAssociation)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.cs new file mode 100644 index 000000000000..8e457d2bfb38 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/ResourceAssociation.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Information about resource association. + public partial class ResourceAssociation + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ResourceAssociation() + { + } + + /// Initializes a new instance of . + /// Name of the resource association. + /// Access Mode of the resource association. + /// Keeps track of any properties unknown to the library. + internal ResourceAssociation(string name, AccessMode? accessMode, IDictionary serializedAdditionalRawData) + { + Name = name; + AccessMode = accessMode; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Name of the resource association. + public string Name { get; } + /// Access Mode of the resource association. + public AccessMode? AccessMode { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Severity.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Severity.cs new file mode 100644 index 000000000000..e63c9b46b246 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/Models/Severity.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.BotService.Models +{ + /// Provisioning state of Network Security Perimeter configuration propagation. + public readonly partial struct Severity : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public Severity(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string WarningValue = "Warning"; + private const string ErrorValue = "Error"; + + /// Warning. + public static Severity Warning { get; } = new Severity(WarningValue); + /// Error. + public static Severity Error { get; } = new Severity(ErrorValue); + /// Determines if two values are the same. + public static bool operator ==(Severity left, Severity right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(Severity left, Severity right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator Severity(string value) => new Severity(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is Severity other && Equals(other); + /// + public bool Equals(Severity other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs new file mode 100644 index 000000000000..8f5821e41f46 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationCollection.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Autorest.CSharp.Core; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.BotService +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get a instance call the GetNetworkSecurityPerimeterConfigurations method from an instance of . + /// + public partial class NetworkSecurityPerimeterConfigurationCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationRestClient; + + /// Initializes a new instance of the class for mocking. + protected NetworkSecurityPerimeterConfigurationCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal NetworkSecurityPerimeterConfigurationCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkSecurityPerimeterConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.BotService", NetworkSecurityPerimeterConfigurationResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(NetworkSecurityPerimeterConfigurationResource.ResourceType, out string networkSecurityPerimeterConfigurationApiVersion); + _networkSecurityPerimeterConfigurationRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkSecurityPerimeterConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != BotResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, BotResource.ResourceType), nameof(id)); + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Get"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// List Network Security Perimeter configurations associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkSecurityPerimeterConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterConfigurationResource(Client, NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e)), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, "NetworkSecurityPerimeterConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// List Network Security Perimeter configurations associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_List + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + HttpMessage FirstPageRequest(int? pageSizeHint) => _networkSecurityPerimeterConfigurationRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _networkSecurityPerimeterConfigurationRestClient.CreateListNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name); + return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new NetworkSecurityPerimeterConfigurationResource(Client, NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(e)), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, "NetworkSecurityPerimeterConfigurationCollection.GetAll", "value", "nextLink", cancellationToken); + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.Exists"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetIfExistsAsync(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken: cancellationToken).ConfigureAwait(false); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Tries to get details for this resource from the service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual NullableResponse GetIfExists(string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationCollection.GetIfExists"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, networkSecurityPerimeterConfigurationName, cancellationToken: cancellationToken); + if (response.Value == null) + return new NoValueResponse(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs new file mode 100644 index 000000000000..0deb5b8b931d --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.Serialization.cs @@ -0,0 +1,182 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; +using Azure.ResourceManager.BotService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.BotService +{ + public partial class NetworkSecurityPerimeterConfigurationData : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(Properties)) + { + writer.WritePropertyName("properties"u8); + writer.WriteObjectValue(Properties, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W") + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType); + } + if (options.Format != "W" && Optional.IsDefined(SystemData)) + { + writer.WritePropertyName("systemData"u8); + JsonSerializer.Serialize(writer, SystemData); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); + } + + internal static NetworkSecurityPerimeterConfigurationData DeserializeNetworkSecurityPerimeterConfigurationData(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + NetworkSecurityPerimeterConfigurationProperties properties = default; + ResourceIdentifier id = default; + string name = default; + ResourceType type = default; + SystemData systemData = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("properties"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + properties = NetworkSecurityPerimeterConfigurationProperties.DeserializeNetworkSecurityPerimeterConfigurationProperties(property.Value, options); + continue; + } + if (property.NameEquals("id"u8)) + { + id = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + type = new ResourceType(property.Value.GetString()); + continue; + } + if (property.NameEquals("systemData"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new NetworkSecurityPerimeterConfigurationData( + id, + name, + type, + systemData, + properties, + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support writing '{options.Format}' format."); + } + } + + NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(NetworkSecurityPerimeterConfigurationData)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.cs new file mode 100644 index 000000000000..9ef44c5943ba --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationData.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; +using Azure.ResourceManager.BotService.Models; +using Azure.ResourceManager.Models; + +namespace Azure.ResourceManager.BotService +{ + /// + /// A class representing the NetworkSecurityPerimeterConfiguration data model. + /// Network Security Perimeter configuration + /// + public partial class NetworkSecurityPerimeterConfigurationData : ResourceData + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal NetworkSecurityPerimeterConfigurationData() + { + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Properties of the Network Security Perimeter configuration. + /// Keeps track of any properties unknown to the library. + internal NetworkSecurityPerimeterConfigurationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, NetworkSecurityPerimeterConfigurationProperties properties, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + { + Properties = properties; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Properties of the Network Security Perimeter configuration. + public NetworkSecurityPerimeterConfigurationProperties Properties { get; } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs new file mode 100644 index 000000000000..0df8bf1752af --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.Serialization.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.ResourceManager.BotService +{ + public partial class NetworkSecurityPerimeterConfigurationResource : IJsonModel + { + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) => ((IJsonModel)Data).Write(writer, options); + + NetworkSecurityPerimeterConfigurationData IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => ((IJsonModel)Data).Create(ref reader, options); + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => ModelReaderWriter.Write(Data, options); + + NetworkSecurityPerimeterConfigurationData IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => ModelReaderWriter.Read(data, options); + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => ((IPersistableModel)Data).GetFormatFromOptions(options); + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs new file mode 100644 index 000000000000..8e6aa849b3bd --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/NetworkSecurityPerimeterConfigurationResource.cs @@ -0,0 +1,255 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.ResourceManager.BotService +{ + /// + /// A Class representing a NetworkSecurityPerimeterConfiguration along with the instance operations that can be performed on it. + /// If you have a you can construct a + /// from an instance of using the GetNetworkSecurityPerimeterConfigurationResource method. + /// Otherwise you can get one from its parent resource using the GetNetworkSecurityPerimeterConfiguration method. + /// + public partial class NetworkSecurityPerimeterConfigurationResource : ArmResource + { + /// Generate the resource identifier of a instance. + /// The subscriptionId. + /// The resourceGroupName. + /// The resourceName. + /// The networkSecurityPerimeterConfigurationName. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _networkSecurityPerimeterConfigurationClientDiagnostics; + private readonly NetworkSecurityPerimeterConfigurationsRestOperations _networkSecurityPerimeterConfigurationRestClient; + private readonly NetworkSecurityPerimeterConfigurationData _data; + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.BotService/botServices/networkSecurityPerimeterConfigurations"; + + /// Initializes a new instance of the class for mocking. + protected NetworkSecurityPerimeterConfigurationResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal NetworkSecurityPerimeterConfigurationResource(ArmClient client, NetworkSecurityPerimeterConfigurationData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal NetworkSecurityPerimeterConfigurationResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _networkSecurityPerimeterConfigurationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.BotService", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string networkSecurityPerimeterConfigurationApiVersion); + _networkSecurityPerimeterConfigurationRestClient = new NetworkSecurityPerimeterConfigurationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, networkSecurityPerimeterConfigurationApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual NetworkSecurityPerimeterConfigurationData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName} + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Get + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Get"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new NetworkSecurityPerimeterConfigurationResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task> ReconcileAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = await _networkSecurityPerimeterConfigurationRestClient.ReconcileAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new BotServiceArmOperation(new NetworkSecurityPerimeterConfigurationOperationSource(Client), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Reconcile the specified Network Security Perimeter configuration associated with the Bot. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BotService/botServices/{resourceName}/networkSecurityPerimeterConfigurations/{networkSecurityPerimeterConfigurationName}/reconcile + /// + /// + /// Operation Id + /// NetworkSecurityPerimeterConfigurations_Reconcile + /// + /// + /// Default Api Version + /// 2023-09-15-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Reconcile(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _networkSecurityPerimeterConfigurationClientDiagnostics.CreateScope("NetworkSecurityPerimeterConfigurationResource.Reconcile"); + scope.Start(); + try + { + var response = _networkSecurityPerimeterConfigurationRestClient.Reconcile(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new BotServiceArmOperation(new NetworkSecurityPerimeterConfigurationOperationSource(Client), _networkSecurityPerimeterConfigurationClientDiagnostics, Pipeline, _networkSecurityPerimeterConfigurationRestClient.CreateReconcileRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotConnectionRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotConnectionRestOperations.cs index 514995497247..40ca01842c74 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotConnectionRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotConnectionRestOperations.cs @@ -32,7 +32,7 @@ public BotConnectionRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotsRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotsRestOperations.cs index 44a04fbd349a..d5269e2a0cc7 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotsRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/BotsRestOperations.cs @@ -32,7 +32,7 @@ public BotsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/ChannelsRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/ChannelsRestOperations.cs index 4892eff2fb8a..86fff5a1198e 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/ChannelsRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/ChannelsRestOperations.cs @@ -32,7 +32,7 @@ public ChannelsRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/DirectLineRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/DirectLineRestOperations.cs index ee9a3d0e54b4..2dcac132ea85 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/DirectLineRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/DirectLineRestOperations.cs @@ -32,7 +32,7 @@ public DirectLineRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/EmailRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/EmailRestOperations.cs index 08e3dfc5cf10..75357eeea9ca 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/EmailRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/EmailRestOperations.cs @@ -32,7 +32,7 @@ public EmailRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/HostSettingsRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/HostSettingsRestOperations.cs index a7608e07f5fb..16c5ebe8cd1b 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/HostSettingsRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/HostSettingsRestOperations.cs @@ -32,7 +32,7 @@ public HostSettingsRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs new file mode 100644 index 000000000000..7d5a330223e8 --- /dev/null +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/NetworkSecurityPerimeterConfigurationsRestOperations.cs @@ -0,0 +1,415 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.BotService.Models; + +namespace Azure.ResourceManager.BotService +{ + internal partial class NetworkSecurityPerimeterConfigurationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of NetworkSecurityPerimeterConfigurationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public NetworkSecurityPerimeterConfigurationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-09-15-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateGetRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(networkSecurityPerimeterConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(networkSecurityPerimeterConfigurationName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Gets the specified Network Security Perimeter configuration associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkSecurityPerimeterConfigurationData.DeserializeNetworkSecurityPerimeterConfigurationData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((NetworkSecurityPerimeterConfigurationData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListRequestUri(string subscriptionId, string resourceGroupName, string resourceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateListRequest(string subscriptionId, string resourceGroupName, string resourceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Network Security Perimeter configurations associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, resourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Network Security Perimeter configurations associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response List(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListRequest(subscriptionId, resourceGroupName, resourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateReconcileRequestUri(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(networkSecurityPerimeterConfigurationName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateReconcileRequest(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.BotService/botServices/", false); + uri.AppendPath(resourceName, true); + uri.AppendPath("/networkSecurityPerimeterConfigurations/", false); + uri.AppendPath(networkSecurityPerimeterConfigurationName, true); + uri.AppendPath("/reconcile", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Reconcile the specified Network Security Perimeter configuration associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task ReconcileAsync(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Reconcile the specified Network Security Perimeter configuration associated with the Bot. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The resource association Name. Composed of parameter guid and association name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Reconcile(string subscriptionId, string resourceGroupName, string resourceName, string networkSecurityPerimeterConfigurationName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + Argument.AssertNotNullOrEmpty(networkSecurityPerimeterConfigurationName, nameof(networkSecurityPerimeterConfigurationName)); + + using var message = CreateReconcileRequest(subscriptionId, resourceGroupName, resourceName, networkSecurityPerimeterConfigurationName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 202: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal RequestUriBuilder CreateListNextPageRequestUri(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + return uri; + } + + internal HttpMessage CreateListNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string resourceName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// List Network Security Perimeter configurations associated with the Bot. + /// The URL to the next page of results. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// List Network Security Perimeter configurations associated with the Bot. + /// The URL to the next page of results. + /// Azure Subscription ID. + /// The name of the Bot resource group in the user subscription. + /// The name of the Bot resource. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListNextPage(string nextLink, string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); + + using var message = CreateListNextPageRequest(nextLink, subscriptionId, resourceGroupName, resourceName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + NetworkSecurityPerimeterConfigurationList value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = NetworkSecurityPerimeterConfigurationList.DeserializeNetworkSecurityPerimeterConfigurationList(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs index 2661b50cad70..b50a05fd2652 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateEndpointConnectionsRestOperations.cs @@ -32,7 +32,7 @@ public PrivateEndpointConnectionsRestOperations(HttpPipeline pipeline, string ap { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs index d8db0ab6d917..5a1b80d04fd6 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/PrivateLinkResourcesRestOperations.cs @@ -32,7 +32,7 @@ public PrivateLinkResourcesRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/QnAMakerEndpointKeysRestOperations.cs b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/QnAMakerEndpointKeysRestOperations.cs index 61e4c1624801..7e788eaa737e 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/QnAMakerEndpointKeysRestOperations.cs +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/Generated/RestOperations/QnAMakerEndpointKeysRestOperations.cs @@ -32,7 +32,7 @@ public QnAMakerEndpointKeysRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-09-15"; + _apiVersion = apiVersion ?? "2023-09-15-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/botservice/Azure.ResourceManager.BotService/src/autorest.md b/sdk/botservice/Azure.ResourceManager.BotService/src/autorest.md index 558ac811041e..2e4b5f42601b 100644 --- a/sdk/botservice/Azure.ResourceManager.BotService/src/autorest.md +++ b/sdk/botservice/Azure.ResourceManager.BotService/src/autorest.md @@ -9,7 +9,7 @@ csharp: true library-name: BotService namespace: Azure.ResourceManager.BotService # default tag is now a stable version -require: https://github.com/Azure/azure-rest-api-specs/blob/8468620c009664ed91a3148c04cf77b6c8eb7b6f/specification/botservice/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/botservice/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: