From ec6f17c44acdfe55a6c85322e5eeb9c275a15aff Mon Sep 17 00:00:00 2001
From: azure-powershell-bot
<65331932+azure-powershell-bot@users.noreply.github.com>
Date: Fri, 24 Jun 2022 06:08:10 +0000
Subject: [PATCH 1/4] Move NetworkFunction to main
---
src/NetworkFunction/Az.NetworkFunction.csproj | 7 +
.../Az.NetworkFunction.format.ps1xml | 693 ++
src/NetworkFunction/Az.NetworkFunction.psd1 | 141 +
src/NetworkFunction/Az.NetworkFunction.psm1 | 115 +
src/NetworkFunction/Changelog.md | 24 +
src/NetworkFunction/NetworkFunction.sln | 104 +
.../Properties/AssemblyInfo.cs | 28 +
src/NetworkFunction/README.md | 52 +
src/NetworkFunction/build-module.ps1 | 161 +
src/NetworkFunction/check-dependencies.ps1 | 65 +
src/NetworkFunction/create-model-cmdlets.ps1 | 179 +
.../custom/Az.NetworkFunction.custom.psm1 | 17 +
src/NetworkFunction/custom/README.md | 41 +
...-AzNetworkFunctionAzureTrafficCollector.md | 22 +
...onAzureTrafficCollectorsByResourceGroup.md | 22 +
...ionAzureTrafficCollectorsBySubscription.md | 22 +
.../Get-AzNetworkFunctionCollectorPolicy.md | 22 +
.../Get-AzNetworkFunctionOperation.md | 22 +
...-AzNetworkFunctionAzureTrafficCollector.md | 22 +
.../New-AzNetworkFunctionCollectorPolicy.md | 22 +
...-AzNetworkFunctionAzureTrafficCollector.md | 22 +
...Remove-AzNetworkFunctionCollectorPolicy.md | 22 +
...NetworkFunctionAzureTrafficCollectorTag.md | 22 +
src/NetworkFunction/export-surface.ps1 | 41 +
...AzNetworkFunctionAzureTrafficCollector.ps1 | 200 +
...nAzureTrafficCollectorsByResourceGroup.ps1 | 172 +
...onAzureTrafficCollectorsBySubscription.ps1 | 166 +
.../Get-AzNetworkFunctionCollectorPolicy.ps1 | 210 +
.../Get-AzNetworkFunctionOperation.ps1 | 156 +
...AzNetworkFunctionAzureTrafficCollector.ps1 | 231 +
.../New-AzNetworkFunctionCollectorPolicy.ps1 | 233 +
.../exports/ProxyCmdletDefinitions.ps1 | 1881 ++++++
src/NetworkFunction/exports/README.md | 20 +
...AzNetworkFunctionAzureTrafficCollector.ps1 | 218 +
...emove-AzNetworkFunctionCollectorPolicy.ps1 | 224 +
...etworkFunctionAzureTrafficCollectorTag.ps1 | 206 +
src/NetworkFunction/generate-help.ps1 | 74 +
src/NetworkFunction/generate-info.json | 8 +
src/NetworkFunction/generated/Module.cs | 181 +
.../AzureTrafficCollector.PowerShell.cs | 294 +
.../AzureTrafficCollector.TypeConverter.cs | 147 +
.../Api20220501/AzureTrafficCollector.cs | 198 +
.../Api20220501/AzureTrafficCollector.json.cs | 115 +
...reTrafficCollectorListResult.PowerShell.cs | 174 +
...rafficCollectorListResult.TypeConverter.cs | 148 +
.../AzureTrafficCollectorListResult.cs | 71 +
.../AzureTrafficCollectorListResult.json.cs | 121 +
...ficCollectorPropertiesFormat.PowerShell.cs | 193 +
...CollectorPropertiesFormat.TypeConverter.cs | 150 +
.../AzureTrafficCollectorPropertiesFormat.cs | 100 +
...reTrafficCollectorPropertiesFormat.json.cs | 124 +
.../Api20220501/CloudError.PowerShell.cs | 196 +
.../Api20220501/CloudError.TypeConverter.cs | 146 +
.../api/Models/Api20220501/CloudError.cs | 120 +
.../api/Models/Api20220501/CloudError.json.cs | 108 +
.../Api20220501/CloudErrorBody.PowerShell.cs | 188 +
.../CloudErrorBody.TypeConverter.cs | 147 +
.../api/Models/Api20220501/CloudErrorBody.cs | 120 +
.../Models/Api20220501/CloudErrorBody.json.cs | 122 +
.../Api20220501/CollectorPolicy.PowerShell.cs | 284 +
.../CollectorPolicy.TypeConverter.cs | 147 +
.../api/Models/Api20220501/CollectorPolicy.cs | 256 +
.../Api20220501/CollectorPolicy.json.cs | 120 +
.../CollectorPolicyListResult.PowerShell.cs | 174 +
...CollectorPolicyListResult.TypeConverter.cs | 147 +
.../Api20220501/CollectorPolicyListResult.cs | 71 +
.../CollectorPolicyListResult.json.cs | 121 +
...lectorPolicyPropertiesFormat.PowerShell.cs | 198 +
...torPolicyPropertiesFormat.TypeConverter.cs | 148 +
.../CollectorPolicyPropertiesFormat.cs | 111 +
.../CollectorPolicyPropertiesFormat.json.cs | 123 +
.../CollectorPolicySystemData.PowerShell.cs | 198 +
...CollectorPolicySystemData.TypeConverter.cs | 147 +
.../Api20220501/CollectorPolicySystemData.cs | 73 +
.../CollectorPolicySystemData.json.cs | 108 +
...sionPoliciesPropertiesFormat.PowerShell.cs | 174 +
...nPoliciesPropertiesFormat.TypeConverter.cs | 148 +
.../EmissionPoliciesPropertiesFormat.cs | 68 +
.../EmissionPoliciesPropertiesFormat.json.cs | 118 +
.../EmissionPolicyDestination.PowerShell.cs | 166 +
...EmissionPolicyDestination.TypeConverter.cs | 147 +
.../Api20220501/EmissionPolicyDestination.cs | 51 +
.../EmissionPolicyDestination.json.cs | 108 +
...estionPolicyPropertiesFormat.PowerShell.cs | 174 +
...ionPolicyPropertiesFormat.TypeConverter.cs | 148 +
.../IngestionPolicyPropertiesFormat.cs | 68 +
.../IngestionPolicyPropertiesFormat.json.cs | 118 +
...stionSourcesPropertiesFormat.PowerShell.cs | 174 +
...onSourcesPropertiesFormat.TypeConverter.cs | 148 +
.../IngestionSourcesPropertiesFormat.cs | 68 +
.../IngestionSourcesPropertiesFormat.json.cs | 110 +
.../Api20220501/Operation.PowerShell.cs | 220 +
.../Api20220501/Operation.TypeConverter.cs | 146 +
.../api/Models/Api20220501/Operation.cs | 153 +
.../api/Models/Api20220501/Operation.json.cs | 114 +
.../OperationDisplay.PowerShell.cs | 188 +
.../OperationDisplay.TypeConverter.cs | 147 +
.../Models/Api20220501/OperationDisplay.cs | 102 +
.../Api20220501/OperationDisplay.json.cs | 114 +
.../OperationListResult.PowerShell.cs | 178 +
.../OperationListResult.TypeConverter.cs | 147 +
.../Models/Api20220501/OperationListResult.cs | 73 +
.../Api20220501/OperationListResult.json.cs | 121 +
.../Api20220501/ProxyResource.PowerShell.cs | 180 +
.../ProxyResource.TypeConverter.cs | 147 +
.../api/Models/Api20220501/ProxyResource.cs | 94 +
.../Models/Api20220501/ProxyResource.json.cs | 121 +
.../ResourceReference.PowerShell.cs | 164 +
.../ResourceReference.TypeConverter.cs | 147 +
.../Models/Api20220501/ResourceReference.cs | 54 +
.../Api20220501/ResourceReference.json.cs | 111 +
.../Api20220501/SystemData.PowerShell.cs | 196 +
.../Api20220501/SystemData.TypeConverter.cs | 146 +
.../api/Models/Api20220501/SystemData.cs | 119 +
.../api/Models/Api20220501/SystemData.json.cs | 116 +
.../Api20220501/TagsObject.PowerShell.cs | 164 +
.../Api20220501/TagsObject.TypeConverter.cs | 146 +
.../api/Models/Api20220501/TagsObject.cs | 51 +
.../api/Models/Api20220501/TagsObject.json.cs | 108 +
.../Api20220501/TagsObjectTags.PowerShell.cs | 160 +
.../TagsObjectTags.TypeConverter.cs | 147 +
.../api/Models/Api20220501/TagsObjectTags.cs | 35 +
.../Api20220501/TagsObjectTags.dictionary.cs | 75 +
.../Models/Api20220501/TagsObjectTags.json.cs | 109 +
.../Api20220501/TrackedResource.PowerShell.cs | 244 +
.../TrackedResource.TypeConverter.cs | 147 +
.../api/Models/Api20220501/TrackedResource.cs | 210 +
.../Api20220501/TrackedResource.json.cs | 130 +
.../TrackedResourceSystemData.PowerShell.cs | 198 +
...TrackedResourceSystemData.TypeConverter.cs | 147 +
.../Api20220501/TrackedResourceSystemData.cs | 73 +
.../TrackedResourceSystemData.json.cs | 108 +
.../TrackedResourceTags.PowerShell.cs | 162 +
.../TrackedResourceTags.TypeConverter.cs | 147 +
.../Models/Api20220501/TrackedResourceTags.cs | 35 +
.../TrackedResourceTags.dictionary.cs | 75 +
.../Api20220501/TrackedResourceTags.json.cs | 109 +
.../NetworkFunctionIdentity.PowerShell.cs | 194 +
.../NetworkFunctionIdentity.TypeConverter.cs | 157 +
.../api/Models/NetworkFunctionIdentity.cs | 116 +
.../Models/NetworkFunctionIdentity.json.cs | 115 +
.../generated/api/NetworkFunction.cs | 2277 +++++++
.../api/Support/CreatedByType.Completer.cs | 47 +
.../Support/CreatedByType.TypeConverter.cs | 59 +
.../generated/api/Support/CreatedByType.cs | 102 +
.../api/Support/DestinationType.Completer.cs | 35 +
.../Support/DestinationType.TypeConverter.cs | 59 +
.../generated/api/Support/DestinationType.cs | 96 +
.../api/Support/EmissionType.Completer.cs | 35 +
.../api/Support/EmissionType.TypeConverter.cs | 59 +
.../generated/api/Support/EmissionType.cs | 96 +
.../api/Support/IngestionType.Completer.cs | 35 +
.../Support/IngestionType.TypeConverter.cs | 59 +
.../generated/api/Support/IngestionType.cs | 96 +
.../Support/ProvisioningState.Completer.cs | 47 +
.../ProvisioningState.TypeConverter.cs | 59 +
.../api/Support/ProvisioningState.cs | 102 +
.../api/Support/SourceType.Completer.cs | 35 +
.../api/Support/SourceType.TypeConverter.cs | 59 +
.../generated/api/Support/SourceType.cs | 96 +
...etworkFunctionAzureTrafficCollector_Get.cs | 404 ++
...ionAzureTrafficCollector_GetViaIdentity.cs | 382 ++
...reTrafficCollectorsByResourceGroup_List.cs | 412 ++
...ureTrafficCollectorsBySubscription_List.cs | 397 ++
...GetAzNetworkFunctionCollectorPolicy_Get.cs | 418 ++
...kFunctionCollectorPolicy_GetViaIdentity.cs | 386 ++
...etAzNetworkFunctionCollectorPolicy_List.cs | 425 ++
.../GetAzNetworkFunctionOperation_List.cs | 355 ++
...orkFunctionAzureTrafficCollector_Create.cs | 485 ++
...ionAzureTrafficCollector_CreateExpanded.cs | 511 ++
...AzureTrafficCollector_CreateViaIdentity.cs | 465 ++
...fficCollector_CreateViaIdentityExpanded.cs | 491 ++
...AzNetworkFunctionCollectorPolicy_Create.cs | 500 ++
...kFunctionCollectorPolicy_CreateExpanded.cs | 525 ++
...nctionCollectorPolicy_CreateViaIdentity.cs | 467 ++
...llectorPolicy_CreateViaIdentityExpanded.cs | 495 ++
...orkFunctionAzureTrafficCollector_Delete.cs | 509 ++
...AzureTrafficCollector_DeleteViaIdentity.cs | 490 ++
...AzNetworkFunctionCollectorPolicy_Delete.cs | 524 ++
...nctionCollectorPolicy_DeleteViaIdentity.cs | 493 ++
...orkFunctionAzureTrafficCollector_Update.cs | 485 ++
...ionAzureTrafficCollector_UpdateExpanded.cs | 512 ++
...AzNetworkFunctionCollectorPolicy_Update.cs | 500 ++
...kFunctionCollectorPolicy_UpdateExpanded.cs | 526 ++
...FunctionAzureTrafficCollectorTag_Update.cs | 417 ++
...AzureTrafficCollectorTag_UpdateExpanded.cs | 419 ++
...reTrafficCollectorTag_UpdateViaIdentity.cs | 400 ++
...cCollectorTag_UpdateViaIdentityExpanded.cs | 401 ++
.../generated/runtime/AsyncCommandRuntime.cs | 832 +++
.../generated/runtime/AsyncJob.cs | 270 +
.../runtime/AsyncOperationResponse.cs | 176 +
.../BuildTime/Cmdlets/ExportCmdletSurface.cs | 113 +
.../BuildTime/Cmdlets/ExportExampleStub.cs | 74 +
.../BuildTime/Cmdlets/ExportFormatPs1xml.cs | 101 +
.../BuildTime/Cmdlets/ExportHelpMarkdown.cs | 53 +
.../BuildTime/Cmdlets/ExportModelSurface.cs | 117 +
.../BuildTime/Cmdlets/ExportProxyCmdlet.cs | 177 +
.../runtime/BuildTime/Cmdlets/ExportPsd1.cs | 191 +
.../BuildTime/Cmdlets/ExportTestStub.cs | 148 +
.../BuildTime/Cmdlets/GetCommonParameter.cs | 52 +
.../BuildTime/Cmdlets/GetModuleGuid.cs | 31 +
.../BuildTime/Cmdlets/GetScriptCmdlet.cs | 54 +
.../runtime/BuildTime/CollectionExtensions.cs | 20 +
.../runtime/BuildTime/MarkdownRenderer.cs | 114 +
.../runtime/BuildTime/Models/PsFormatTypes.cs | 138 +
.../BuildTime/Models/PsHelpMarkdownOutputs.cs | 199 +
.../runtime/BuildTime/Models/PsHelpTypes.cs | 202 +
.../BuildTime/Models/PsMarkdownTypes.cs | 294 +
.../BuildTime/Models/PsProxyOutputs.cs | 611 ++
.../runtime/BuildTime/Models/PsProxyTypes.cs | 514 ++
.../runtime/BuildTime/PsAttributes.cs | 114 +
.../runtime/BuildTime/PsExtensions.cs | 169 +
.../generated/runtime/BuildTime/PsHelpers.cs | 105 +
.../runtime/BuildTime/StringExtensions.cs | 24 +
.../runtime/BuildTime/XmlExtensions.cs | 28 +
.../generated/runtime/CmdInfoHandler.cs | 40 +
.../Conversions/ConversionException.cs | 17 +
.../runtime/Conversions/IJsonConverter.cs | 13 +
.../Conversions/Instances/BinaryConverter.cs | 24 +
.../Conversions/Instances/BooleanConverter.cs | 13 +
.../Instances/DateTimeConverter.cs | 18 +
.../Instances/DateTimeOffsetConverter.cs | 15 +
.../Conversions/Instances/DecimalConverter.cs | 16 +
.../Conversions/Instances/DoubleConverter.cs | 13 +
.../Conversions/Instances/EnumConverter.cs | 30 +
.../Conversions/Instances/GuidConverter.cs | 15 +
.../Instances/HashSet'1Converter.cs | 27 +
.../Conversions/Instances/Int16Converter.cs | 13 +
.../Conversions/Instances/Int32Converter.cs | 13 +
.../Conversions/Instances/Int64Converter.cs | 13 +
.../Instances/JsonArrayConverter.cs | 13 +
.../Instances/JsonObjectConverter.cs | 13 +
.../Conversions/Instances/SingleConverter.cs | 13 +
.../Conversions/Instances/StringConverter.cs | 13 +
.../Instances/TimeSpanConverter.cs | 15 +
.../Conversions/Instances/UInt16Converter.cs | 13 +
.../Conversions/Instances/UInt32Converter.cs | 13 +
.../Conversions/Instances/UInt64Converter.cs | 13 +
.../Conversions/Instances/UriConverter.cs | 15 +
.../runtime/Conversions/JsonConverter.cs | 21 +
.../Conversions/JsonConverterAttribute.cs | 18 +
.../Conversions/JsonConverterFactory.cs | 91 +
.../Conversions/StringLikeConverter.cs | 45 +
.../Customizations/IJsonSerializable.cs | 263 +
.../runtime/Customizations/JsonArray.cs | 13 +
.../runtime/Customizations/JsonBoolean.cs | 16 +
.../runtime/Customizations/JsonNode.cs | 21 +
.../runtime/Customizations/JsonNumber.cs | 78 +
.../runtime/Customizations/JsonObject.cs | 183 +
.../runtime/Customizations/JsonString.cs | 34 +
.../runtime/Customizations/XNodeArray.cs | 44 +
.../generated/runtime/Debugging.cs | 28 +
.../generated/runtime/DictionaryExtensions.cs | 33 +
.../generated/runtime/EventData.cs | 78 +
.../generated/runtime/EventDataExtensions.cs | 94 +
.../generated/runtime/EventListener.cs | 247 +
.../generated/runtime/Events.cs | 27 +
.../generated/runtime/EventsExtensions.cs | 27 +
.../generated/runtime/Extensions.cs | 117 +
.../Extensions/StringBuilderExtensions.cs | 23 +
.../Helpers/Extensions/TypeExtensions.cs | 61 +
.../generated/runtime/Helpers/Seperator.cs | 11 +
.../generated/runtime/Helpers/TypeDetails.cs | 116 +
.../generated/runtime/Helpers/XHelper.cs | 75 +
.../generated/runtime/HttpPipeline.cs | 88 +
.../generated/runtime/HttpPipelineMocking.ps1 | 110 +
.../generated/runtime/IAssociativeArray.cs | 24 +
.../generated/runtime/IHeaderSerializable.cs | 14 +
.../generated/runtime/ISendAsync.cs | 300 +
.../generated/runtime/InfoAttribute.cs | 34 +
.../generated/runtime/Iso/IsoDate.cs | 214 +
.../generated/runtime/JsonType.cs | 18 +
.../generated/runtime/MessageAttribute.cs | 360 ++
.../runtime/MessageAttributeHelper.cs | 161 +
.../generated/runtime/Method.cs | 19 +
.../generated/runtime/Models/JsonMember.cs | 83 +
.../generated/runtime/Models/JsonModel.cs | 89 +
.../runtime/Models/JsonModelCache.cs | 19 +
.../runtime/Nodes/Collections/JsonArray.cs | 65 +
.../Nodes/Collections/XImmutableArray.cs | 62 +
.../runtime/Nodes/Collections/XList.cs | 64 +
.../runtime/Nodes/Collections/XNodeArray.cs | 68 +
.../runtime/Nodes/Collections/XSet.cs | 60 +
.../generated/runtime/Nodes/JsonBoolean.cs | 42 +
.../generated/runtime/Nodes/JsonDate.cs | 173 +
.../generated/runtime/Nodes/JsonNode.cs | 250 +
.../generated/runtime/Nodes/JsonNumber.cs | 109 +
.../generated/runtime/Nodes/JsonObject.cs | 172 +
.../generated/runtime/Nodes/JsonString.cs | 42 +
.../generated/runtime/Nodes/XBinary.cs | 40 +
.../generated/runtime/Nodes/XNull.cs | 15 +
.../Parser/Exceptions/ParseException.cs | 24 +
.../generated/runtime/Parser/JsonParser.cs | 180 +
.../generated/runtime/Parser/JsonToken.cs | 66 +
.../generated/runtime/Parser/JsonTokenizer.cs | 177 +
.../generated/runtime/Parser/Location.cs | 43 +
.../runtime/Parser/Readers/SourceReader.cs | 130 +
.../generated/runtime/Parser/TokenReader.cs | 39 +
.../generated/runtime/PipelineMocking.cs | 262 +
.../runtime/Properties/Resources.Designer.cs | 5633 +++++++++++++++++
.../runtime/Properties/Resources.resx | 1741 +++++
.../generated/runtime/Response.cs | 27 +
.../runtime/Serialization/JsonSerializer.cs | 350 +
.../Serialization/PropertyTransformation.cs | 21 +
.../Serialization/SerializationOptions.cs | 65 +
.../generated/runtime/SerializationMode.cs | 16 +
.../runtime/TypeConverterExtensions.cs | 211 +
.../runtime/UndeclaredResponseException.cs | 112 +
.../generated/runtime/Writers/JsonWriter.cs | 223 +
.../generated/runtime/delegates.cs | 23 +
.../help/Az.NetworkFunction.md | 43 +
...-AzNetworkFunctionAzureTrafficCollector.md | 160 +
...onAzureTrafficCollectorsByResourceGroup.md | 108 +
...ionAzureTrafficCollectorsBySubscription.md | 93 +
.../Get-AzNetworkFunctionCollectorPolicy.md | 181 +
.../help/Get-AzNetworkFunctionOperation.md | 77 +
...-AzNetworkFunctionAzureTrafficCollector.md | 251 +
.../New-AzNetworkFunctionCollectorPolicy.md | 264 +
...-AzNetworkFunctionAzureTrafficCollector.md | 237 +
...Remove-AzNetworkFunctionCollectorPolicy.md | 252 +
...NetworkFunctionAzureTrafficCollectorTag.md | 207 +
src/NetworkFunction/how-to.md | 58 +
.../internal/Az.NetworkFunction.internal.psm1 | 38 +
...AzNetworkFunctionAzureTrafficCollector.ps1 | 252 +
.../New-AzNetworkFunctionCollectorPolicy.ps1 | 245 +
.../internal/ProxyCmdletDefinitions.ps1 | 1076 ++++
src/NetworkFunction/internal/README.md | 14 +
...AzNetworkFunctionAzureTrafficCollector.ps1 | 233 +
.../Set-AzNetworkFunctionCollectorPolicy.ps1 | 226 +
...etworkFunctionAzureTrafficCollectorTag.ps1 | 180 +
src/NetworkFunction/pack-module.ps1 | 17 +
src/NetworkFunction/run-module.ps1 | 62 +
src/NetworkFunction/test-module.ps1 | 94 +
...orkFunctionAzureTrafficCollector.Tests.ps1 | 25 +
...TrafficCollectorsByResourceGroup.Tests.ps1 | 21 +
...eTrafficCollectorsBySubscription.Tests.ps1 | 21 +
...AzNetworkFunctionCollectorPolicy.Tests.ps1 | 29 +
.../Get-AzNetworkFunctionOperation.Tests.ps1 | 21 +
...zNetworkFunctionTrafficCollector.Tests.ps1 | 29 +
...rkFunctionTrafficCollectorPolicy.Tests.ps1 | 29 +
...orkFunctionAzureTrafficCollector.Tests.ps1 | 21 +
...AzNetworkFunctionCollectorPolicy.Tests.ps1 | 21 +
...zNetworkFunctionTrafficCollector.Tests.ps1 | 33 +
...rkFunctionTrafficCollectorPolicy.Tests.ps1 | 33 +
src/NetworkFunction/test/README.md | 17 +
...orkFunctionAzureTrafficCollector.Tests.ps1 | 25 +
...AzNetworkFunctionCollectorPolicy.Tests.ps1 | 25 +
...zNetworkFunctionTrafficCollector.Tests.ps1 | 25 +
...rkFunctionTrafficCollectorPolicy.Tests.ps1 | 25 +
...zNetworkFunctionTrafficCollector.Tests.ps1 | 33 +
...rkFunctionTrafficCollectorPolicy.Tests.ps1 | 33 +
...FunctionAzureTrafficCollectorTag.Tests.ps1 | 25 +
...tworkFunctionTrafficCollectorTag.Tests.ps1 | 33 +
src/NetworkFunction/test/loadEnv.ps1 | 29 +
src/NetworkFunction/test/utils.ps1 | 31 +
.../utils/Unprotect-SecureString.ps1 | 16 +
356 files changed, 60463 insertions(+)
create mode 100644 src/NetworkFunction/Az.NetworkFunction.csproj
create mode 100644 src/NetworkFunction/Az.NetworkFunction.format.ps1xml
create mode 100644 src/NetworkFunction/Az.NetworkFunction.psd1
create mode 100644 src/NetworkFunction/Az.NetworkFunction.psm1
create mode 100644 src/NetworkFunction/Changelog.md
create mode 100644 src/NetworkFunction/NetworkFunction.sln
create mode 100644 src/NetworkFunction/Properties/AssemblyInfo.cs
create mode 100644 src/NetworkFunction/README.md
create mode 100644 src/NetworkFunction/build-module.ps1
create mode 100644 src/NetworkFunction/check-dependencies.ps1
create mode 100644 src/NetworkFunction/create-model-cmdlets.ps1
create mode 100644 src/NetworkFunction/custom/Az.NetworkFunction.custom.psm1
create mode 100644 src/NetworkFunction/custom/README.md
create mode 100644 src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.md
create mode 100644 src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.md
create mode 100644 src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/examples/Get-AzNetworkFunctionOperation.md
create mode 100644 src/NetworkFunction/examples/New-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/examples/Remove-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/examples/Update-AzNetworkFunctionAzureTrafficCollectorTag.md
create mode 100644 src/NetworkFunction/export-surface.ps1
create mode 100644 src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollector.ps1
create mode 100644 src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.ps1
create mode 100644 src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.ps1
create mode 100644 src/NetworkFunction/exports/Get-AzNetworkFunctionCollectorPolicy.ps1
create mode 100644 src/NetworkFunction/exports/Get-AzNetworkFunctionOperation.ps1
create mode 100644 src/NetworkFunction/exports/New-AzNetworkFunctionAzureTrafficCollector.ps1
create mode 100644 src/NetworkFunction/exports/New-AzNetworkFunctionCollectorPolicy.ps1
create mode 100644 src/NetworkFunction/exports/ProxyCmdletDefinitions.ps1
create mode 100644 src/NetworkFunction/exports/README.md
create mode 100644 src/NetworkFunction/exports/Remove-AzNetworkFunctionAzureTrafficCollector.ps1
create mode 100644 src/NetworkFunction/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1
create mode 100644 src/NetworkFunction/exports/Update-AzNetworkFunctionAzureTrafficCollectorTag.ps1
create mode 100644 src/NetworkFunction/generate-help.ps1
create mode 100644 src/NetworkFunction/generate-info.json
create mode 100644 src/NetworkFunction/generated/Module.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudError.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudError.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudError.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudError.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/Operation.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/Operation.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/Operation.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/Operation.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/SystemData.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/SystemData.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/SystemData.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/SystemData.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.dictionary.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.dictionary.cs
create mode 100644 src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.json.cs
create mode 100644 src/NetworkFunction/generated/api/Models/NetworkFunctionIdentity.PowerShell.cs
create mode 100644 src/NetworkFunction/generated/api/Models/NetworkFunctionIdentity.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Models/NetworkFunctionIdentity.cs
create mode 100644 src/NetworkFunction/generated/api/Models/NetworkFunctionIdentity.json.cs
create mode 100644 src/NetworkFunction/generated/api/NetworkFunction.cs
create mode 100644 src/NetworkFunction/generated/api/Support/CreatedByType.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/CreatedByType.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/CreatedByType.cs
create mode 100644 src/NetworkFunction/generated/api/Support/DestinationType.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/DestinationType.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/DestinationType.cs
create mode 100644 src/NetworkFunction/generated/api/Support/EmissionType.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/EmissionType.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/EmissionType.cs
create mode 100644 src/NetworkFunction/generated/api/Support/IngestionType.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/IngestionType.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/IngestionType.cs
create mode 100644 src/NetworkFunction/generated/api/Support/ProvisioningState.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/ProvisioningState.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/ProvisioningState.cs
create mode 100644 src/NetworkFunction/generated/api/Support/SourceType.Completer.cs
create mode 100644 src/NetworkFunction/generated/api/Support/SourceType.TypeConverter.cs
create mode 100644 src/NetworkFunction/generated/api/Support/SourceType.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionAzureTrafficCollector_Get.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionAzureTrafficCollector_GetViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionAzureTrafficCollectorsByResourceGroup_List.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionAzureTrafficCollectorsBySubscription_List.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_Get.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_GetViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionCollectorPolicy_List.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/GetAzNetworkFunctionOperation_List.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionAzureTrafficCollector_Create.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionAzureTrafficCollector_CreateExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionAzureTrafficCollector_CreateViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionAzureTrafficCollector_CreateViaIdentityExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_Create.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/NewAzNetworkFunctionCollectorPolicy_CreateViaIdentityExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/RemoveAzNetworkFunctionAzureTrafficCollector_Delete.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/RemoveAzNetworkFunctionAzureTrafficCollector_DeleteViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_Delete.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/RemoveAzNetworkFunctionCollectorPolicy_DeleteViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/SetAzNetworkFunctionAzureTrafficCollector_Update.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/SetAzNetworkFunctionAzureTrafficCollector_UpdateExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_Update.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/SetAzNetworkFunctionCollectorPolicy_UpdateExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/UpdateAzNetworkFunctionAzureTrafficCollectorTag_Update.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/UpdateAzNetworkFunctionAzureTrafficCollectorTag_UpdateExpanded.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/UpdateAzNetworkFunctionAzureTrafficCollectorTag_UpdateViaIdentity.cs
create mode 100644 src/NetworkFunction/generated/cmdlets/UpdateAzNetworkFunctionAzureTrafficCollectorTag_UpdateViaIdentityExpanded.cs
create mode 100644 src/NetworkFunction/generated/runtime/AsyncCommandRuntime.cs
create mode 100644 src/NetworkFunction/generated/runtime/AsyncJob.cs
create mode 100644 src/NetworkFunction/generated/runtime/AsyncOperationResponse.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/CollectionExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/MarkdownRenderer.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsFormatTypes.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsHelpTypes.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsProxyOutputs.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/Models/PsProxyTypes.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/PsAttributes.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/PsExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/PsHelpers.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/StringExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/BuildTime/XmlExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/CmdInfoHandler.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/ConversionException.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/IJsonConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/BinaryConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/BooleanConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/DateTimeConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/DecimalConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/DoubleConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/EnumConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/GuidConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/HashSet'1Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/Int16Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/Int32Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/Int64Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/JsonArrayConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/JsonObjectConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/SingleConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/StringConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/TimeSpanConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/UInt16Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/UInt32Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/UInt64Converter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/Instances/UriConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/JsonConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/JsonConverterAttribute.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/JsonConverterFactory.cs
create mode 100644 src/NetworkFunction/generated/runtime/Conversions/StringLikeConverter.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/IJsonSerializable.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonBoolean.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonNode.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonNumber.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonObject.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/JsonString.cs
create mode 100644 src/NetworkFunction/generated/runtime/Customizations/XNodeArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/Debugging.cs
create mode 100644 src/NetworkFunction/generated/runtime/DictionaryExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/EventData.cs
create mode 100644 src/NetworkFunction/generated/runtime/EventDataExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/EventListener.cs
create mode 100644 src/NetworkFunction/generated/runtime/Events.cs
create mode 100644 src/NetworkFunction/generated/runtime/EventsExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/Extensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/Helpers/Extensions/TypeExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/Helpers/Seperator.cs
create mode 100644 src/NetworkFunction/generated/runtime/Helpers/TypeDetails.cs
create mode 100644 src/NetworkFunction/generated/runtime/Helpers/XHelper.cs
create mode 100644 src/NetworkFunction/generated/runtime/HttpPipeline.cs
create mode 100644 src/NetworkFunction/generated/runtime/HttpPipelineMocking.ps1
create mode 100644 src/NetworkFunction/generated/runtime/IAssociativeArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/IHeaderSerializable.cs
create mode 100644 src/NetworkFunction/generated/runtime/ISendAsync.cs
create mode 100644 src/NetworkFunction/generated/runtime/InfoAttribute.cs
create mode 100644 src/NetworkFunction/generated/runtime/Iso/IsoDate.cs
create mode 100644 src/NetworkFunction/generated/runtime/JsonType.cs
create mode 100644 src/NetworkFunction/generated/runtime/MessageAttribute.cs
create mode 100644 src/NetworkFunction/generated/runtime/MessageAttributeHelper.cs
create mode 100644 src/NetworkFunction/generated/runtime/Method.cs
create mode 100644 src/NetworkFunction/generated/runtime/Models/JsonMember.cs
create mode 100644 src/NetworkFunction/generated/runtime/Models/JsonModel.cs
create mode 100644 src/NetworkFunction/generated/runtime/Models/JsonModelCache.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/Collections/JsonArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/Collections/XImmutableArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/Collections/XList.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/Collections/XNodeArray.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/Collections/XSet.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonBoolean.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonDate.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonNode.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonNumber.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonObject.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/JsonString.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/XBinary.cs
create mode 100644 src/NetworkFunction/generated/runtime/Nodes/XNull.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/Exceptions/ParseException.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/JsonParser.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/JsonToken.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/JsonTokenizer.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/Location.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/Readers/SourceReader.cs
create mode 100644 src/NetworkFunction/generated/runtime/Parser/TokenReader.cs
create mode 100644 src/NetworkFunction/generated/runtime/PipelineMocking.cs
create mode 100644 src/NetworkFunction/generated/runtime/Properties/Resources.Designer.cs
create mode 100644 src/NetworkFunction/generated/runtime/Properties/Resources.resx
create mode 100644 src/NetworkFunction/generated/runtime/Response.cs
create mode 100644 src/NetworkFunction/generated/runtime/Serialization/JsonSerializer.cs
create mode 100644 src/NetworkFunction/generated/runtime/Serialization/PropertyTransformation.cs
create mode 100644 src/NetworkFunction/generated/runtime/Serialization/SerializationOptions.cs
create mode 100644 src/NetworkFunction/generated/runtime/SerializationMode.cs
create mode 100644 src/NetworkFunction/generated/runtime/TypeConverterExtensions.cs
create mode 100644 src/NetworkFunction/generated/runtime/UndeclaredResponseException.cs
create mode 100644 src/NetworkFunction/generated/runtime/Writers/JsonWriter.cs
create mode 100644 src/NetworkFunction/generated/runtime/delegates.cs
create mode 100644 src/NetworkFunction/help/Az.NetworkFunction.md
create mode 100644 src/NetworkFunction/help/Get-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/help/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.md
create mode 100644 src/NetworkFunction/help/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.md
create mode 100644 src/NetworkFunction/help/Get-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/help/Get-AzNetworkFunctionOperation.md
create mode 100644 src/NetworkFunction/help/New-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/help/New-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/help/Remove-AzNetworkFunctionAzureTrafficCollector.md
create mode 100644 src/NetworkFunction/help/Remove-AzNetworkFunctionCollectorPolicy.md
create mode 100644 src/NetworkFunction/help/Update-AzNetworkFunctionAzureTrafficCollectorTag.md
create mode 100644 src/NetworkFunction/how-to.md
create mode 100644 src/NetworkFunction/internal/Az.NetworkFunction.internal.psm1
create mode 100644 src/NetworkFunction/internal/New-AzNetworkFunctionAzureTrafficCollector.ps1
create mode 100644 src/NetworkFunction/internal/New-AzNetworkFunctionCollectorPolicy.ps1
create mode 100644 src/NetworkFunction/internal/ProxyCmdletDefinitions.ps1
create mode 100644 src/NetworkFunction/internal/README.md
create mode 100644 src/NetworkFunction/internal/Set-AzNetworkFunctionAzureTrafficCollector.ps1
create mode 100644 src/NetworkFunction/internal/Set-AzNetworkFunctionCollectorPolicy.ps1
create mode 100644 src/NetworkFunction/internal/Update-AzNetworkFunctionAzureTrafficCollectorTag.ps1
create mode 100644 src/NetworkFunction/pack-module.ps1
create mode 100644 src/NetworkFunction/run-module.ps1
create mode 100644 src/NetworkFunction/test-module.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionAzureTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionOperation.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/Get-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/New-AzNetworkFunctionAzureTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/New-AzNetworkFunctionCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/New-AzNetworkFunctionTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/New-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/README.md
create mode 100644 src/NetworkFunction/test/Remove-AzNetworkFunctionAzureTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/Remove-AzNetworkFunctionCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/Remove-AzNetworkFunctionTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/Remove-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollector.Tests.ps1
create mode 100644 src/NetworkFunction/test/Set-AzNetworkFunctionTrafficCollectorPolicy.Tests.ps1
create mode 100644 src/NetworkFunction/test/Update-AzNetworkFunctionAzureTrafficCollectorTag.Tests.ps1
create mode 100644 src/NetworkFunction/test/Update-AzNetworkFunctionTrafficCollectorTag.Tests.ps1
create mode 100644 src/NetworkFunction/test/loadEnv.ps1
create mode 100644 src/NetworkFunction/test/utils.ps1
create mode 100644 src/NetworkFunction/utils/Unprotect-SecureString.ps1
diff --git a/src/NetworkFunction/Az.NetworkFunction.csproj b/src/NetworkFunction/Az.NetworkFunction.csproj
new file mode 100644
index 000000000000..90d365b651f8
--- /dev/null
+++ b/src/NetworkFunction/Az.NetworkFunction.csproj
@@ -0,0 +1,7 @@
+
+
+ NetworkFunction
+
+
+
+
diff --git a/src/NetworkFunction/Az.NetworkFunction.format.ps1xml b/src/NetworkFunction/Az.NetworkFunction.format.ps1xml
new file mode 100644
index 000000000000..aa62c8f2ad00
--- /dev/null
+++ b/src/NetworkFunction/Az.NetworkFunction.format.ps1xml
@@ -0,0 +1,693 @@
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.NetworkFunctionIdentity
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.NetworkFunctionIdentity
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AzureTrafficCollectorName
+
+
+ CollectorPolicyName
+
+
+ ResourceGroupName
+
+
+ SubscriptionId
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollector
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollector
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ Name
+
+
+ SystemDataCreatedAt
+
+
+ SystemDataCreatedBy
+
+
+ SystemDataCreatedByType
+
+
+ SystemDataLastModifiedBy
+
+
+ SystemDataLastModifiedByType
+
+
+ Etag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormat
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormat
+
+
+
+
+
+
+
+
+
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
+
+
+ Message
+
+
+ Target
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicy
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicy
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+ Etag
+
+
+ ResourceGroupName
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormat
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormat
+
+
+
+
+
+
+
+
+
+
+
+ ProvisioningState
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicySystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicySystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormat
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormat
+
+
+
+
+
+
+
+
+
+
+
+ EmissionType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPolicyDestination
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPolicyDestination
+
+
+
+
+
+
+
+
+
+
+
+ DestinationType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormat
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormat
+
+
+
+
+
+
+
+
+
+
+
+ IngestionType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormat
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormat
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ResourceId
+
+
+ SourceType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.Operation
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.Operation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IsDataAction
+
+
+ Name
+
+
+ Origin
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplay
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Description
+
+
+ Operation
+
+
+ Provider
+
+
+ Resource
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationListResult
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationListResult
+
+
+
+
+
+
+
+
+
+
+
+ NextLink
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ProxyResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ProxyResource
+
+
+
+
+
+
+
+
+
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResource
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResource
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Location
+
+
+ Name
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceSystemData
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceSystemData
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ CreatedAt
+
+
+ CreatedBy
+
+
+ CreatedByType
+
+
+ LastModifiedBy
+
+
+ LastModifiedByType
+
+
+
+
+
+
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTags
+
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTags
+
+
+
+
+
+
+
+
+
+
+
+ Item
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/NetworkFunction/Az.NetworkFunction.psd1 b/src/NetworkFunction/Az.NetworkFunction.psd1
new file mode 100644
index 000000000000..25981da2ea6b
--- /dev/null
+++ b/src/NetworkFunction/Az.NetworkFunction.psd1
@@ -0,0 +1,141 @@
+#
+# Module manifest for module 'Az.NetworkFunction'
+#
+# Generated by: Microsoft Corporation
+#
+# Generated on: 6/24/2022
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+RootModule = './Az.NetworkFunction.psm1'
+
+# Version number of this module.
+ModuleVersion = '0.1.0'
+
+# Supported PSEditions
+CompatiblePSEditions = 'Core', 'Desktop'
+
+# ID used to uniquely identify this module
+GUID = '1d339b1c-5a86-4fbd-9a2e-d0497c39b397'
+
+# Author of this module
+Author = 'Microsoft Corporation'
+
+# Company or vendor of this module
+CompanyName = 'Microsoft Corporation'
+
+# Copyright statement for this module
+Copyright = 'Microsoft Corporation. All rights reserved.'
+
+# Description of the functionality provided by this module
+Description = 'Microsoft Azure PowerShell: NetworkFunction cmdlets'
+
+# Minimum version of the PowerShell engine required by this module
+PowerShellVersion = '5.1'
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+DotNetFrameworkVersion = '4.7.2'
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# ClrVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.8.0'; })
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = './bin/Az.NetworkFunction.private.dll'
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+# ScriptsToProcess = @()
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+FormatsToProcess = './Az.NetworkFunction.format.ps1xml'
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+# NestedModules = @()
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+FunctionsToExport = 'Get-AzNetworkFunctionAzureTrafficCollector',
+ 'Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup',
+ 'Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription',
+ 'Get-AzNetworkFunctionCollectorPolicy',
+ 'Get-AzNetworkFunctionOperation',
+ 'New-AzNetworkFunctionAzureTrafficCollector',
+ 'New-AzNetworkFunctionCollectorPolicy',
+ 'Remove-AzNetworkFunctionAzureTrafficCollector',
+ 'Remove-AzNetworkFunctionCollectorPolicy',
+ 'Update-AzNetworkFunctionAzureTrafficCollectorTag'
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+# VariablesToExport = @()
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = '*'
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ Tags = 'Azure','ResourceManager','ARM','PSModule','NetworkFunction'
+
+ # A URL to the license for this module.
+ LicenseUri = 'https://aka.ms/azps-license'
+
+ # A URL to the main website for this project.
+ ProjectUri = 'https://github.com/Azure/azure-powershell'
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ # Prerelease string of this module
+ # Prerelease = ''
+
+ # Flag to indicate whether the module requires explicit user acceptance for install/update/save
+ # RequireLicenseAcceptance = $false
+
+ # External dependent modules of this module
+ # ExternalModuleDependencies = @()
+
+ } # End of PSData hashtable
+
+ } # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/src/NetworkFunction/Az.NetworkFunction.psm1 b/src/NetworkFunction/Az.NetworkFunction.psm1
new file mode 100644
index 000000000000..505851428836
--- /dev/null
+++ b/src/NetworkFunction/Az.NetworkFunction.psm1
@@ -0,0 +1,115 @@
+# region Generated
+ # ----------------------------------------------------------------------------------
+ # Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+ # ----------------------------------------------------------------------------------
+ # Load required Az.Accounts module
+ $accountsName = 'Az.Accounts'
+ $accountsModule = Get-Module -Name $accountsName
+ if(-not $accountsModule) {
+ $localAccountsPath = Join-Path $PSScriptRoot 'generated\modules'
+ if(Test-Path -Path $localAccountsPath) {
+ $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1
+ if($localAccounts) {
+ $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru
+ }
+ }
+ if(-not $accountsModule) {
+ $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0
+ if($hasAdequateVersion) {
+ $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru
+ }
+ }
+ }
+
+ if(-not $accountsModule) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://docs.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop
+ } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) {
+ Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop
+ }
+ Write-Information "Loaded Module '$($accountsModule.Name)'"
+
+ # Load the private module dll
+ $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.NetworkFunction.private.dll')
+
+ # Get the private module's instance
+ $instance = [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module]::Instance
+
+ # Ask for the shared functionality table
+ $VTable = Register-AzModule
+
+ # Tweaks the pipeline on module load
+ $instance.OnModuleLoad = $VTable.OnModuleLoad
+
+ # Following two delegates are added for telemetry
+ $instance.GetTelemetryId = $VTable.GetTelemetryId
+ $instance.Telemetry = $VTable.Telemetry
+
+
+ # Tweaks the pipeline per call
+ $instance.OnNewRequest = $VTable.OnNewRequest
+
+ # Gets shared parameter values
+ $instance.GetParameterValue = $VTable.GetParameterValue
+
+ # Allows shared module to listen to events from this module
+ $instance.EventListener = $VTable.EventListener
+
+ # Gets shared argument completers
+ $instance.ArgumentCompleter = $VTable.ArgumentCompleter
+
+ # The name of the currently selected Azure profile
+ $instance.ProfileName = $VTable.ProfileName
+
+
+ # Load the custom module
+ $customModulePath = Join-Path $PSScriptRoot './custom/Az.NetworkFunction.custom.psm1'
+ if(Test-Path $customModulePath) {
+ $null = Import-Module -Name $customModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export proxy cmdlet scripts
+ $exportsPath = Join-Path $PSScriptRoot './exports'
+ $directories = Get-ChildItem -Directory -Path $exportsPath
+ $profileDirectory = $null
+ if($instance.ProfileName) {
+ if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) {
+ $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName }
+ } else {
+ # Don't export anything if the profile doesn't exist for the module
+ $exportsPath = $null
+ Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded."
+ }
+ } elseif(($directories | Measure-Object).Count -gt 0) {
+ # Load the last folder if no profile is selected
+ $profileDirectory = $directories | Select-Object -Last 1
+ }
+
+ if($profileDirectory) {
+ Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'"
+ $exportsPath = $profileDirectory.FullName
+ }
+
+ if($exportsPath) {
+ Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath
+ Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias)
+ }
+
+ # Finalize initialization of this module
+ $instance.Init();
+ Write-Information "Loaded Module '$($instance.Name)'"
+# endregion
diff --git a/src/NetworkFunction/Changelog.md b/src/NetworkFunction/Changelog.md
new file mode 100644
index 000000000000..6a183a0e62ee
--- /dev/null
+++ b/src/NetworkFunction/Changelog.md
@@ -0,0 +1,24 @@
+
+## Upcoming Release
+
+## Version 0.1.0
+* First preview release for module Az.NetworkFunction
+
diff --git a/src/NetworkFunction/NetworkFunction.sln b/src/NetworkFunction/NetworkFunction.sln
new file mode 100644
index 000000000000..324e2c40c657
--- /dev/null
+++ b/src/NetworkFunction/NetworkFunction.sln
@@ -0,0 +1,104 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.6.30114.105
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Accounts", "..\Accounts\Accounts\Accounts.csproj", "{E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication", "..\Accounts\Authentication\Authentication.csproj", "{B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authentication.ResourceManager", "..\Accounts\Authentication.ResourceManager\Authentication.ResourceManager.csproj", "{9F66BAC3-4094-4880-8C81-4C7B22EF2845}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AuthenticationAssemblyLoadContext", "..\Accounts\AuthenticationAssemblyLoadContext\AuthenticationAssemblyLoadContext.csproj", "{3C0924D4-327F-4DDE-B5F8-F8340E1CD750}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Authenticators", "..\Accounts\Authenticators\Authenticators.csproj", "{03163694-F73A-43DF-859E-DB3677BF0CD7}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Az.NetworkFunction", "Az.NetworkFunction.csproj", "{231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|x64.Build.0 = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Debug|x86.Build.0 = Debug|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|x64.ActiveCfg = Release|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|x64.Build.0 = Release|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|x86.ActiveCfg = Release|Any CPU
+ {E2E2DBCE-B78C-4D0B-95C4-9EA67D96309C}.Release|x86.Build.0 = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|x64.Build.0 = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Debug|x86.Build.0 = Debug|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|x64.ActiveCfg = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|x64.Build.0 = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|x86.ActiveCfg = Release|Any CPU
+ {B1802359-6D04-4EF7-8BC6-4859FBDA3CCD}.Release|x86.Build.0 = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|x64.Build.0 = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Debug|x86.Build.0 = Debug|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|x64.ActiveCfg = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|x64.Build.0 = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|x86.ActiveCfg = Release|Any CPU
+ {9F66BAC3-4094-4880-8C81-4C7B22EF2845}.Release|x86.Build.0 = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|x64.Build.0 = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Debug|x86.Build.0 = Debug|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|x64.ActiveCfg = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|x64.Build.0 = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|x86.ActiveCfg = Release|Any CPU
+ {3C0924D4-327F-4DDE-B5F8-F8340E1CD750}.Release|x86.Build.0 = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|x64.Build.0 = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Debug|x86.Build.0 = Debug|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|x64.ActiveCfg = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|x64.Build.0 = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|x86.ActiveCfg = Release|Any CPU
+ {03163694-F73A-43DF-859E-DB3677BF0CD7}.Release|x86.Build.0 = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|x64.Build.0 = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Debug|x86.Build.0 = Debug|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|x64.ActiveCfg = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|x64.Build.0 = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|x86.ActiveCfg = Release|Any CPU
+ {231FD0D8-7E70-4B6E-8B11-3FE2278A9FFB}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal
diff --git a/src/NetworkFunction/Properties/AssemblyInfo.cs b/src/NetworkFunction/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000000..2ff90ea4d1c8
--- /dev/null
+++ b/src/NetworkFunction/Properties/AssemblyInfo.cs
@@ -0,0 +1,28 @@
+// ----------------------------------------------------------------------------------
+//
+// Copyright Microsoft Corporation
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+// http://www.apache.org/licenses/LICENSE-2.0
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+// ----------------------------------------------------------------------------------
+
+using System;
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("Microsoft Azure Powershell - NetworkFunction")]
+[assembly: AssemblyCompany(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCompany)]
+[assembly: AssemblyProduct(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyProduct)]
+[assembly: AssemblyCopyright(Microsoft.WindowsAzure.Commands.Common.AzurePowerShell.AssemblyCopyright)]
+
+[assembly: ComVisible(false)]
+[assembly: CLSCompliant(false)]
+[assembly: Guid("7a174813-ba42-4145-bf07-8f570b529b42")]
+[assembly: AssemblyVersion("0.1.0")]
+[assembly: AssemblyFileVersion("0.1.0")]
diff --git a/src/NetworkFunction/README.md b/src/NetworkFunction/README.md
new file mode 100644
index 000000000000..31fa5cdf9c35
--- /dev/null
+++ b/src/NetworkFunction/README.md
@@ -0,0 +1,52 @@
+
+# Az.NetworkFunction
+This directory contains the PowerShell module for the NetworkFunction service.
+
+---
+## Status
+[![Az.NetworkFunction](https://img.shields.io/powershellgallery/v/Az.NetworkFunction.svg?style=flat-square&label=Az.NetworkFunction "Az.NetworkFunction")](https://www.powershellgallery.com/packages/Az.NetworkFunction/)
+
+## Info
+- Modifiable: yes
+- Generated: all
+- Committed: yes
+- Packaged: yes
+
+---
+## Detail
+This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension.
+
+## Module Requirements
+- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater
+
+## Authentication
+AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent.
+
+## Development
+For information on how to develop for `Az.NetworkFunction`, see [how-to.md](how-to.md).
+
+
+### AutoRest Configuration
+> see https://aka.ms/autorest
+
+``` yaml
+branch: 2f47130d8fb333f55596ca9d149fbdceaff6f4be
+require:
+ - $(this-folder)/../readme.azure.noprofile.md
+input-file:
+ - $(repo)/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-05-01/AzureTrafficCollector.json
+module-version: 0.1.0
+title: NetworkFunction
+subject-prefix: $(service-name)
+identity-correction-for-post: true
+resourcegroup-append: true
+nested-object-to-string: true
+
+directive:
+ - where:
+ variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$
+ hide: true
+ - where:
+ verb: Set
+ hide: true
+```
diff --git a/src/NetworkFunction/build-module.ps1 b/src/NetworkFunction/build-module.ps1
new file mode 100644
index 000000000000..77002b284aa8
--- /dev/null
+++ b/src/NetworkFunction/build-module.ps1
@@ -0,0 +1,161 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs)
+$ErrorActionPreference = 'Stop'
+
+if($PSEdition -ne 'Core') {
+ Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.'
+}
+
+if(-not $Isolated -and -not $Debugger) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+
+ if($LastExitCode -ne 0) {
+ # Build failed. Don't attempt to run the module.
+ return
+ }
+
+ if($Test) {
+ . (Join-Path $PSScriptRoot 'test-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Tests failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Docs) {
+ . (Join-Path $PSScriptRoot 'generate-help.ps1')
+ if($LastExitCode -ne 0) {
+ # Docs generation failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ if($Pack) {
+ . (Join-Path $PSScriptRoot 'pack-module.ps1')
+ if($LastExitCode -ne 0) {
+ # Packing failed. Don't attempt to run the module.
+ return
+ }
+ }
+
+ $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1'
+ if($Code) {
+ . $runModulePath -Code
+ } elseif($Run) {
+ . $runModulePath
+ } else {
+ Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script."
+ }
+ return
+}
+
+$binFolder = Join-Path $PSScriptRoot 'bin'
+$objFolder = Join-Path $PSScriptRoot 'obj'
+
+if(-not $Debugger) {
+ Write-Host -ForegroundColor Green 'Cleaning build folders...'
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder
+
+ if((Test-Path $binFolder) -or (Test-Path $objFolder)) {
+ Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?'
+ Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.'
+ }
+
+ Write-Host -ForegroundColor Green 'Compiling module...'
+ $buildConfig = 'Debug'
+ if($Release) {
+ $buildConfig = 'Release'
+ }
+ dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo
+ if($LastExitCode -ne 0) {
+ Write-Error 'Compilation failed.'
+ }
+
+ $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release')
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.NetworkFunction.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+
+# Load DLL to use build-time cmdlets
+$null = Import-Module -Name $dll
+
+$modulePaths = $dll
+$customPsm1 = Join-Path $PSScriptRoot 'custom\Az.NetworkFunction.custom.psm1'
+if(Test-Path $customPsm1) {
+ $modulePaths = @($dll, $customPsm1)
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(Test-Path $exportsFolder) {
+ $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $exportsFolder
+
+$internalFolder = Join-Path $PSScriptRoot 'internal'
+if(Test-Path $internalFolder) {
+ $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $internalFolder
+
+$psd1 = Join-Path $PSScriptRoot './Az.NetworkFunction.psd1'
+$guid = Get-ModuleGuid -Psd1Path $psd1
+$moduleName = 'Az.NetworkFunction'
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+$null = New-Item -ItemType Directory -Force -Path $examplesFolder
+
+Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...'
+$modelCmdlets = @()
+if ($modelCmdlets.Count -gt 0) {
+ . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1')
+ CreateModelCmdlet($modelCmdlets)
+}
+
+if($NoDocs) {
+ Write-Host -ForegroundColor Green 'Creating exports...'
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder
+} else {
+ Write-Host -ForegroundColor Green 'Creating exports and docs...'
+ $moduleDescription = 'Microsoft Azure PowerShell: NetworkFunction cmdlets'
+ $docsFolder = Join-Path $PSScriptRoot 'docs'
+ if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+ }
+ $null = New-Item -ItemType Directory -Force -Path $docsFolder
+ Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
+}
+
+Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
+$formatPs1xml = Join-Path $PSScriptRoot './Az.NetworkFunction.format.ps1xml'
+Export-FormatPs1xml -FilePath $formatPs1xml
+
+Write-Host -ForegroundColor Green 'Creating psd1...'
+$customFolder = Join-Path $PSScriptRoot 'custom'
+Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid
+
+Write-Host -ForegroundColor Green 'Creating test stubs...'
+$testFolder = Join-Path $PSScriptRoot 'test'
+$null = New-Item -ItemType Directory -Force -Path $testFolder
+Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder
+
+Write-Host -ForegroundColor Green 'Creating example stubs...'
+Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
diff --git a/src/NetworkFunction/check-dependencies.ps1 b/src/NetworkFunction/check-dependencies.ps1
new file mode 100644
index 000000000000..c29591c7bfe1
--- /dev/null
+++ b/src/NetworkFunction/check-dependencies.ps1
@@ -0,0 +1,65 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources)
+$ErrorActionPreference = 'Stop'
+
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+ & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) {
+ if($predicate) {
+ $module = Get-Module -ListAvailable -Name $moduleName
+ if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) {
+ $null = New-Item -ItemType Directory -Force -Path $path
+ Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..."
+ if ($requiredVersion) {
+ Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path
+ }elseif($versionMinimum) {
+ Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path
+ } else {
+ Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path
+ }
+ }
+ }
+}
+
+$ProgressPreference = 'SilentlyContinue'
+$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1
+
+$localModulesPath = Join-Path $PSScriptRoot 'generated\modules'
+if(Test-Path -Path $localModulesPath) {
+ $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath"
+}
+
+DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5'
+DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1'
+
+$tools = Join-Path $PSScriptRoot 'tools'
+$resourceDir = Join-Path $tools 'Resources'
+$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1'
+
+if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) {
+ Write-Host -ForegroundColor Green "Building local Resource module used for test..."
+ Set-Location $resourceDir
+ $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources
+ $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/
+ Set-Location $HOME/.PSSharedModules/Resources
+ $null = .\build-module.ps1
+ Set-Location $PSScriptRoot
+}
diff --git a/src/NetworkFunction/create-model-cmdlets.ps1 b/src/NetworkFunction/create-model-cmdlets.ps1
new file mode 100644
index 000000000000..81f6b8e0991b
--- /dev/null
+++ b/src/NetworkFunction/create-model-cmdlets.ps1
@@ -0,0 +1,179 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+function CreateModelCmdlet {
+
+ param([string[]]$Models)
+
+ if ($Models.Count -eq 0)
+ {
+ return
+ }
+
+ $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models'
+ $ModuleName = 'NetworkFunction'
+ $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets'
+ $null = New-Item -ItemType Directory -Force -Path $OutputDir
+
+ $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs
+ $Content = ''
+ $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 )
+ { $Content += get-content $_.fullname -raw
+ } }
+
+ $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content)
+ $Nodes = $Tree.ChildNodes().ChildNodes()
+ foreach ($Model in $Models)
+ {
+ $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") }
+ if ($InterfaceNode.count -eq 0) {
+ continue
+ }
+ # through a queue, we iterate all the parent models.
+ $Queue = @($InterfaceNode)
+ $visited = @("I$Model")
+ $AllInterfaceNodes = @()
+ while ($Queue.count -ne 0)
+ {
+ $AllInterfaceNodes += $Queue[0]
+ # Baselist contains the direct parent models.
+ foreach ($parent in $Queue[0].BaseList.Types)
+ {
+ if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value)))
+ {
+ $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) })
+ $visited = [Array]$visited + $parent.Type.Right.Identifier.Value
+ }
+ }
+ $first, $Queue = $Queue
+ }
+
+ $Namespace = $InterfaceNode.Parent.Name
+ $ObjectType = $Model
+ $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}"
+ # remove duplicated module name
+ if ($ObjectType.StartsWith($ModuleName)) {
+ $ModulePrefix = ''
+ } else {
+ $ModulePrefix = $ModuleName
+ }
+ $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir
+
+ $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string]
+ $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string]
+ foreach ($Node in $AllInterfaceNodes)
+ {
+ foreach ($Member in $Node.Members)
+ {
+ $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments
+ $Required = $false
+ $Description = ""
+ $Readonly = $False
+ foreach ($Argument in $Arguments)
+ {
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Required")
+ {
+ $Required = $Argument.Expression.Token.Value
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Description")
+ {
+ $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"')
+ }
+ if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly")
+ {
+ $Readonly = $Argument.Expression.Token.Value
+ }
+ }
+ if ($Readonly)
+ {
+ continue
+ }
+ $Identifier = $Member.Identifier.Value
+ $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1]
+ $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string]
+ if ($Required)
+ {
+ $ParameterDefinePropertyList.Add("Mandatory")
+ }
+ if ($Description -ne "")
+ {
+ $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"")
+ }
+ $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList)
+ # check whether completer is needed
+ $completer = '';
+ if($Type.Split('.').Split('.')[-2] -eq 'Support') {
+ # If Type is an array, need to strip []
+ $strippedType = $Type.Replace('[]', '')
+ $completer += "`n [ArgumentCompleter([${strippedType}])]"
+ }
+ $ParameterDefineScript = "
+ [Parameter($ParameterDefineProperty)]${completer}
+ [${Type}]
+ `$${Identifier}"
+ $ParameterDefineScriptList.Add($ParameterDefineScript)
+ $ParameterAssignScriptList.Add("
+ if (`$PSBoundParameters.ContainsKey('${Identifier}')) {
+ `$Object.${Identifier} = `$${Identifier}
+ }")
+ }
+ }
+ $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator ","
+ $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator ""
+
+ $Script = "
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the ""License"");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an ""AS IS"" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Create an in-memory object for ${ObjectType}.
+.Description
+Create an in-memory object for ${ObjectType}.
+
+.Outputs
+${ObjectTypeWithNamespace}
+.Link
+https://docs.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object
+#>
+function New-Az${ModulePrefix}${ObjectType}Object {
+ [OutputType('${ObjectTypeWithNamespace}')]
+ [CmdletBinding(PositionalBinding=`$false)]
+ Param(
+${ParameterDefineScript}
+ )
+
+ process {
+ `$Object = [${ObjectTypeWithNamespace}]::New()
+${ParameterAssignScript}
+ return `$Object
+ }
+}
+"
+ Set-Content -Path $OutputPath -Value $Script
+ }
+}
diff --git a/src/NetworkFunction/custom/Az.NetworkFunction.custom.psm1 b/src/NetworkFunction/custom/Az.NetworkFunction.custom.psm1
new file mode 100644
index 000000000000..5fad643ca70c
--- /dev/null
+++ b/src/NetworkFunction/custom/Az.NetworkFunction.custom.psm1
@@ -0,0 +1,17 @@
+# region Generated
+ # Load the private module dll
+ $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.NetworkFunction.private.dll')
+
+ # Load the internal module
+ $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.NetworkFunction.internal.psm1'
+ if(Test-Path $internalModulePath) {
+ $null = Import-Module -Name $internalModulePath
+ }
+
+ # Export nothing to clear implicit exports
+ Export-ModuleMember
+
+ # Export script cmdlets
+ Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName }
+ Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias)
+# endregion
diff --git a/src/NetworkFunction/custom/README.md b/src/NetworkFunction/custom/README.md
new file mode 100644
index 000000000000..b215827d31cd
--- /dev/null
+++ b/src/NetworkFunction/custom/README.md
@@ -0,0 +1,41 @@
+# Custom
+This directory contains custom implementation for non-generated cmdlets for the `Az.NetworkFunction` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `..\exports` folder. The only generated file into this folder is the `Az.NetworkFunction.custom.psm1`. This file should not be modified.
+
+## Info
+- Modifiable: yes
+- Generated: partial
+- Committed: yes
+- Packaged: yes
+
+## Details
+For `Az.NetworkFunction` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*.
+
+For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.NetworkFunction.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder.
+
+For script cmdlets, these are loaded via the `Az.NetworkFunction.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build.
+
+## Purpose
+This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `..\exports` folder.
+
+## Usage
+The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `..\exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters:
+- Break
+- DefaultProfile
+- HttpPipelineAppend
+- HttpPipelinePrepend
+- Proxy
+- ProxyCredential
+- ProxyUseDefaultCredentials
+
+These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.NetworkFunction`. For C#, follow the usage seen in the `ProcessRecordAsync` method.
+
+### Attributes
+For processing the cmdlets, we've created some additional attributes:
+- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.DescriptionAttribute`
+ - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts.
+- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.DoNotExportAttribute`
+ - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.NetworkFunction`.
+- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.InternalExportAttribute`
+ - Used in C# cmdlets to route exported cmdlets to the `..\internal`, which are *not exposed* by `Az.NetworkFunction`. For more information, see [README.md](..\internal/README.md) in the `..\internal` folder.
+- `Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.ProfileAttribute`
+ - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules.
\ No newline at end of file
diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollector.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollector.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollector.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionCollectorPolicy.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Get-AzNetworkFunctionOperation.md b/src/NetworkFunction/examples/Get-AzNetworkFunctionOperation.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Get-AzNetworkFunctionOperation.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/New-AzNetworkFunctionAzureTrafficCollector.md b/src/NetworkFunction/examples/New-AzNetworkFunctionAzureTrafficCollector.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/New-AzNetworkFunctionAzureTrafficCollector.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/New-AzNetworkFunctionCollectorPolicy.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Remove-AzNetworkFunctionAzureTrafficCollector.md b/src/NetworkFunction/examples/Remove-AzNetworkFunctionAzureTrafficCollector.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Remove-AzNetworkFunctionAzureTrafficCollector.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md b/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Remove-AzNetworkFunctionCollectorPolicy.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/examples/Update-AzNetworkFunctionAzureTrafficCollectorTag.md b/src/NetworkFunction/examples/Update-AzNetworkFunctionAzureTrafficCollectorTag.md
new file mode 100644
index 000000000000..6ee1a83db970
--- /dev/null
+++ b/src/NetworkFunction/examples/Update-AzNetworkFunctionAzureTrafficCollectorTag.md
@@ -0,0 +1,22 @@
+### Example 1: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
+### Example 2: {{ Add title here }}
+```powershell
+{{ Add code here }}
+```
+
+```output
+{{ Add output here }}
+```
+
+{{ Add description here }}
+
diff --git a/src/NetworkFunction/export-surface.ps1 b/src/NetworkFunction/export-surface.ps1
new file mode 100644
index 000000000000..5754d1286cce
--- /dev/null
+++ b/src/NetworkFunction/export-surface.ps1
@@ -0,0 +1,41 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$dll = Join-Path $PSScriptRoot 'bin\Az.NetworkFunction.private.dll'
+if(-not (Test-Path $dll)) {
+ Write-Error "Unable to find output assembly in '$binFolder'."
+}
+$null = Import-Module -Name $dll
+
+$moduleName = 'Az.NetworkFunction'
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+$resourcesFolder = Join-Path $PSScriptRoot 'resources'
+
+Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'"
+
+Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent
+Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'"
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollector.ps1 b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollector.ps1
new file mode 100644
index 000000000000..ef20ea1179d6
--- /dev/null
+++ b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollector.ps1
@@ -0,0 +1,200 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Gets the specified Azure Traffic Collector in a specified resource group
+.Description
+Gets the specified Azure Traffic Collector in a specified resource group
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollector
+#>
+function Get-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_Get';
+ GetViaIdentity = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_GetViaIdentity';
+ }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.ps1 b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.ps1
new file mode 100644
index 000000000000..b462ff4ddf7c
--- /dev/null
+++ b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup.ps1
@@ -0,0 +1,172 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Return list of Azure Traffic Collectors in a Resource Group
+.Description
+Return list of Azure Traffic Collectors in a Resource Group
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollectorsbyresourcegroup
+#>
+function Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.ps1 b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.ps1
new file mode 100644
index 000000000000..826a8e1f757d
--- /dev/null
+++ b/src/NetworkFunction/exports/Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription.ps1
@@ -0,0 +1,166 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Return list of Azure Traffic Collectors in a subscription
+.Description
+Return list of Azure Traffic Collectors in a subscription
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollectorsbysubscription
+#>
+function Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Get-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/exports/Get-AzNetworkFunctionCollectorPolicy.ps1
new file mode 100644
index 000000000000..5f9674b7c80a
--- /dev/null
+++ b/src/NetworkFunction/exports/Get-AzNetworkFunctionCollectorPolicy.ps1
@@ -0,0 +1,210 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Gets the collector policy in a specified Traffic Collector
+.Description
+Gets the collector policy in a specified Traffic Collector
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctioncollectorpolicy
+#>
+function Get-AzNetworkFunctionCollectorPolicy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_Get';
+ GetViaIdentity = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_GetViaIdentity';
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Get-AzNetworkFunctionOperation.ps1 b/src/NetworkFunction/exports/Get-AzNetworkFunctionOperation.ps1
new file mode 100644
index 000000000000..46473f84a15f
--- /dev/null
+++ b/src/NetworkFunction/exports/Get-AzNetworkFunctionOperation.ps1
@@ -0,0 +1,156 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Lists all of the available NetworkFunction Rest API operations.
+.Description
+Lists all of the available NetworkFunction Rest API operations.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionoperation
+#>
+function Get-AzNetworkFunctionOperation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionOperation_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/New-AzNetworkFunctionAzureTrafficCollector.ps1 b/src/NetworkFunction/exports/New-AzNetworkFunctionAzureTrafficCollector.ps1
new file mode 100644
index 000000000000..473434ea1de4
--- /dev/null
+++ b/src/NetworkFunction/exports/New-AzNetworkFunctionAzureTrafficCollector.ps1
@@ -0,0 +1,231 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Creates or updates a Azure Traffic Collector resource
+.Description
+Creates or updates a Azure Traffic Collector resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+COLLECTORPOLICY : Collector Policies for Azure Traffic Collector.
+ [EmissionPolicy ]: Emission policies.
+ [EmissionDestination ]: Emission policy destinations.
+ [DestinationType ]: Emission destination type.
+ [EmissionType ]: Emission format type.
+ [IngestionPolicyIngestionSource ]: Ingestion Sources.
+ [ResourceId ]: Resource ID.
+ [SourceType ]: Ingestion source type.
+ [IngestionPolicyIngestionType ]: The ingestion type.
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctionazuretrafficcollector
+#>
+function New-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]]
+ # Collector Policies for Azure Traffic Collector.
+ # To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table.
+ ${CollectorPolicy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [System.String]
+ # Resource location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionAzureTrafficCollector_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/New-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/exports/New-AzNetworkFunctionCollectorPolicy.ps1
new file mode 100644
index 000000000000..c192dae0e21d
--- /dev/null
+++ b/src/NetworkFunction/exports/New-AzNetworkFunctionCollectorPolicy.ps1
@@ -0,0 +1,233 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Creates or updates a Collector Policy resource
+.Description
+Creates or updates a Collector Policy resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+EMISSIONPOLICY : Emission policies.
+ [EmissionDestination ]: Emission policy destinations.
+ [DestinationType ]: Emission destination type.
+ [EmissionType ]: Emission format type.
+
+INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources.
+ [ResourceId ]: Resource ID.
+ [SourceType ]: Ingestion source type.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy
+#>
+function New-AzNetworkFunctionCollectorPolicy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]]
+ # Emission policies.
+ # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table.
+ ${EmissionPolicy},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]]
+ # Ingestion Sources.
+ # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table.
+ ${IngestionPolicyIngestionSource},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType]
+ # The ingestion type.
+ ${IngestionPolicyIngestionType},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/ProxyCmdletDefinitions.ps1 b/src/NetworkFunction/exports/ProxyCmdletDefinitions.ps1
new file mode 100644
index 000000000000..0686762cdc25
--- /dev/null
+++ b/src/NetworkFunction/exports/ProxyCmdletDefinitions.ps1
@@ -0,0 +1,1881 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Return list of Azure Traffic Collectors in a Resource Group
+.Description
+Return list of Azure Traffic Collectors in a Resource Group
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollectorsbyresourcegroup
+#>
+function Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollectorsByResourceGroup_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Return list of Azure Traffic Collectors in a subscription
+.Description
+Return list of Azure Traffic Collectors in a subscription
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollectorsbysubscription
+#>
+function Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollectorsBySubscription_List';
+ }
+ if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Gets the specified Azure Traffic Collector in a specified resource group
+.Description
+Gets the specified Azure Traffic Collector in a specified resource group
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionazuretrafficcollector
+#>
+function Get-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_Get';
+ GetViaIdentity = 'Az.NetworkFunction.private\Get-AzNetworkFunctionAzureTrafficCollector_GetViaIdentity';
+ }
+ if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Gets the collector policy in a specified Traffic Collector
+.Description
+Gets the collector policy in a specified Traffic Collector
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctioncollectorpolicy
+#>
+function Get-AzNetworkFunctionCollectorPolicy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(ParameterSetName='Get', Mandatory)]
+ [Parameter(ParameterSetName='List', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Get')]
+ [Parameter(ParameterSetName='List')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String[]]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Get = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_Get';
+ GetViaIdentity = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_GetViaIdentity';
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionCollectorPolicy_List';
+ }
+ if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Lists all of the available NetworkFunction Rest API operations.
+.Description
+Lists all of the available NetworkFunction Rest API operations.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/get-aznetworkfunctionoperation
+#>
+function Get-AzNetworkFunctionOperation {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation])]
+[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)]
+param(
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ List = 'Az.NetworkFunction.private\Get-AzNetworkFunctionOperation_List';
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Creates or updates a Azure Traffic Collector resource
+.Description
+Creates or updates a Azure Traffic Collector resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+COLLECTORPOLICY : Collector Policies for Azure Traffic Collector.
+ [EmissionPolicy ]: Emission policies.
+ [EmissionDestination ]: Emission policy destinations.
+ [DestinationType ]: Emission destination type.
+ [EmissionType ]: Emission format type.
+ [IngestionPolicyIngestionSource ]: Ingestion Sources.
+ [ResourceId ]: Resource ID.
+ [SourceType ]: Ingestion source type.
+ [IngestionPolicyIngestionType ]: The ingestion type.
+ [SystemDataCreatedAt ]: The timestamp of resource creation (UTC).
+ [SystemDataCreatedBy ]: The identity that created the resource.
+ [SystemDataCreatedByType ]: The type of identity that created the resource.
+ [SystemDataLastModifiedBy ]: The identity that last modified the resource.
+ [SystemDataLastModifiedByType ]: The type of identity that last modified the resource.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctionazuretrafficcollector
+#>
+function New-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]]
+ # Collector Policies for Azure Traffic Collector.
+ # To construct, see NOTES section for COLLECTORPOLICY properties and create a hash table.
+ ${CollectorPolicy},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [System.String]
+ # Resource location.
+ ${Location},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionAzureTrafficCollector_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Creates or updates a Collector Policy resource
+.Description
+Creates or updates a Collector Policy resource
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+EMISSIONPOLICY : Emission policies.
+ [EmissionDestination ]: Emission policy destinations.
+ [DestinationType ]: Emission destination type.
+ [EmissionType ]: Emission format type.
+
+INGESTIONPOLICYINGESTIONSOURCE : Ingestion Sources.
+ [ResourceId ]: Resource ID.
+ [SourceType ]: Ingestion source type.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/new-aznetworkfunctioncollectorpolicy
+#>
+function New-AzNetworkFunctionCollectorPolicy {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy])]
+[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]]
+ # Emission policies.
+ # To construct, see NOTES section for EMISSIONPOLICY properties and create a hash table.
+ ${EmissionPolicy},
+
+ [Parameter()]
+ [AllowEmptyCollection()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]]
+ # Ingestion Sources.
+ # To construct, see NOTES section for INGESTIONPOLICYINGESTIONSOURCE properties and create a hash table.
+ ${IngestionPolicyIngestionSource},
+
+ [Parameter()]
+ [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType])]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType]
+ # The ingestion type.
+ ${IngestionPolicyIngestionType},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ CreateExpanded = 'Az.NetworkFunction.private\New-AzNetworkFunctionCollectorPolicy_CreateExpanded';
+ }
+ if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Deletes a specified Azure Traffic Collector resource.
+.Description
+Deletes a specified Azure Traffic Collector resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctionazuretrafficcollector
+#>
+function Remove-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionAzureTrafficCollector_Delete';
+ DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionAzureTrafficCollector_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Deletes a specified Collector Policy resource.
+.Description
+Deletes a specified Collector Policy resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy
+#>
+function Remove-AzNetworkFunctionCollectorPolicy {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_Delete';
+ DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
+
+<#
+.Synopsis
+Updates the specified Azure Traffic Collector tags.
+.Description
+Updates the specified Azure Traffic Collector tags.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctionazuretrafficcollectortag
+#>
+function Update-AzNetworkFunctionAzureTrafficCollectorTag {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionAzureTrafficCollectorTag_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionAzureTrafficCollectorTag_UpdateViaIdentityExpanded';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/README.md b/src/NetworkFunction/exports/README.md
new file mode 100644
index 000000000000..916da891ea7a
--- /dev/null
+++ b/src/NetworkFunction/exports/README.md
@@ -0,0 +1,20 @@
+# Exports
+This directory contains the cmdlets *exported by* `Az.NetworkFunction`. No other cmdlets in this repository are directly exported. What that means is the `Az.NetworkFunction` module will run [Export-ModuleMember](https://docs.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `..\custom` for all custom implementation.
+
+## Info
+- Modifiable: no
+- Generated: all
+- Committed: no
+- Packaged: yes
+
+## Details
+The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`..\bin\Az.NetworkFunction.private.dll`) and from the `..\custom\Az.NetworkFunction.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](..\internal/README.md) in the `..\internal` folder.
+
+## Purpose
+We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles.
+
+## Structure
+The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile.
+
+## Usage
+When `./Az.NetworkFunction.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message.
\ No newline at end of file
diff --git a/src/NetworkFunction/exports/Remove-AzNetworkFunctionAzureTrafficCollector.ps1 b/src/NetworkFunction/exports/Remove-AzNetworkFunctionAzureTrafficCollector.ps1
new file mode 100644
index 000000000000..6fbd0746fb94
--- /dev/null
+++ b/src/NetworkFunction/exports/Remove-AzNetworkFunctionAzureTrafficCollector.ps1
@@ -0,0 +1,218 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Deletes a specified Azure Traffic Collector resource.
+.Description
+Deletes a specified Azure Traffic Collector resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctionazuretrafficcollector
+#>
+function Remove-AzNetworkFunctionAzureTrafficCollector {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('AzureTrafficCollectorName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionAzureTrafficCollector_Delete';
+ DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionAzureTrafficCollector_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1 b/src/NetworkFunction/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1
new file mode 100644
index 000000000000..ad7421f66691
--- /dev/null
+++ b/src/NetworkFunction/exports/Remove-AzNetworkFunctionCollectorPolicy.ps1
@@ -0,0 +1,224 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Deletes a specified Collector Policy resource.
+.Description
+Deletes a specified Collector Policy resource.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+System.Boolean
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/remove-aznetworkfunctioncollectorpolicy
+#>
+function Remove-AzNetworkFunctionCollectorPolicy {
+[OutputType([System.Boolean])]
+[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Alias('CollectorPolicyName')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Collector Policy Name
+ ${Name},
+
+ [Parameter(ParameterSetName='Delete', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='Delete')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command as a job
+ ${AsJob},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Run the command asynchronously
+ ${NoWait},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Returns true when the command succeeds
+ ${PassThru},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ Delete = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_Delete';
+ DeleteViaIdentity = 'Az.NetworkFunction.private\Remove-AzNetworkFunctionCollectorPolicy_DeleteViaIdentity';
+ }
+ if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/exports/Update-AzNetworkFunctionAzureTrafficCollectorTag.ps1 b/src/NetworkFunction/exports/Update-AzNetworkFunctionAzureTrafficCollectorTag.ps1
new file mode 100644
index 000000000000..3e9d7ec0ac27
--- /dev/null
+++ b/src/NetworkFunction/exports/Update-AzNetworkFunctionAzureTrafficCollectorTag.ps1
@@ -0,0 +1,206 @@
+
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+
+<#
+.Synopsis
+Updates the specified Azure Traffic Collector tags.
+.Description
+Updates the specified Azure Traffic Collector tags.
+.Example
+{{ Add code here }}
+.Example
+{{ Add code here }}
+
+.Inputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity
+.Outputs
+Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector
+.Notes
+COMPLEX PARAMETER PROPERTIES
+
+To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.
+
+INPUTOBJECT : Identity Parameter
+ [AzureTrafficCollectorName ]: Azure Traffic Collector name
+ [CollectorPolicyName ]: Collector Policy Name
+ [Id ]: Resource identity path
+ [ResourceGroupName ]: The name of the resource group.
+ [SubscriptionId ]: Azure Subscription ID.
+.Link
+https://docs.microsoft.com/powershell/module/az.networkfunction/update-aznetworkfunctionazuretrafficcollectortag
+#>
+function Update-AzNetworkFunctionAzureTrafficCollectorTag {
+[OutputType([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector])]
+[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')]
+param(
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # Azure Traffic Collector name
+ ${AzureTrafficCollectorName},
+
+ [Parameter(ParameterSetName='UpdateExpanded', Mandatory)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [System.String]
+ # The name of the resource group.
+ ${ResourceGroupName},
+
+ [Parameter(ParameterSetName='UpdateExpanded')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')]
+ [System.String]
+ # Azure Subscription ID.
+ ${SubscriptionId},
+
+ [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Path')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.INetworkFunctionIdentity]
+ # Identity Parameter
+ # To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
+ ${InputObject},
+
+ [Parameter()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Body')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags]))]
+ [System.Collections.Hashtable]
+ # Resource tags.
+ ${Tag},
+
+ [Parameter()]
+ [Alias('AzureRMContext', 'AzureCredential')]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Azure')]
+ [System.Management.Automation.PSObject]
+ # The credentials, account, tenant, and subscription used for communication with Azure.
+ ${DefaultProfile},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Wait for .NET debugger to attach
+ ${Break},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be appended to the front of the pipeline
+ ${HttpPipelineAppend},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SendAsyncStep[]]
+ # SendAsync Pipeline Steps to be prepended to the front of the pipeline
+ ${HttpPipelinePrepend},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Uri]
+ # The URI for the proxy server to use
+ ${Proxy},
+
+ [Parameter(DontShow)]
+ [ValidateNotNull()]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.PSCredential]
+ # Credentials for a proxy server to use for the remote call
+ ${ProxyCredential},
+
+ [Parameter(DontShow)]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Category('Runtime')]
+ [System.Management.Automation.SwitchParameter]
+ # Use the default credentials for the proxy
+ ${ProxyUseDefaultCredentials}
+)
+
+begin {
+ try {
+ $outBuffer = $null
+ if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {
+ $PSBoundParameters['OutBuffer'] = 1
+ }
+ $parameterSet = $PSCmdlet.ParameterSetName
+
+ if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {
+ [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString()
+ }
+ $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ if ($preTelemetryId -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString()
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet)
+ } else {
+ $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ if ($internalCalledCmdlets -eq '') {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name
+ } else {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal'
+ }
+
+ $mapping = @{
+ UpdateExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionAzureTrafficCollectorTag_UpdateExpanded';
+ UpdateViaIdentityExpanded = 'Az.NetworkFunction.private\Update-AzNetworkFunctionAzureTrafficCollectorTag_UpdateViaIdentityExpanded';
+ }
+ if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) {
+ $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id
+ }
+ $cmdInfo = Get-Command -Name $mapping[$parameterSet]
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)
+ $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet)
+ $scriptCmd = {& $wrappedCmd @PSBoundParameters}
+ $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin)
+ $steppablePipeline.Begin($PSCmdlet)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+
+process {
+ try {
+ $steppablePipeline.Process($_)
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+
+ finally {
+ $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId
+ $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+
+}
+end {
+ try {
+ $steppablePipeline.End()
+
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets
+ if ($preTelemetryId -eq '') {
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet)
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ }
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId
+
+ } catch {
+ [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()
+ throw
+ }
+}
+}
diff --git a/src/NetworkFunction/generate-help.ps1 b/src/NetworkFunction/generate-help.ps1
new file mode 100644
index 000000000000..76789e645bfa
--- /dev/null
+++ b/src/NetworkFunction/generate-help.ps1
@@ -0,0 +1,74 @@
+# ----------------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# http://www.apache.org/licenses/LICENSE-2.0
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code
+# is regenerated.
+# ----------------------------------------------------------------------------------
+param([switch]$Isolated)
+$ErrorActionPreference = 'Stop'
+
+$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path
+if(-not $Isolated) {
+ Write-Host -ForegroundColor Green 'Creating isolated process...'
+ & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated
+ return
+}
+
+$exportsFolder = Join-Path $PSScriptRoot 'exports'
+if(-not (Test-Path $exportsFolder)) {
+ Write-Error "Exports folder '$exportsFolder' was not found."
+}
+
+$directories = Get-ChildItem -Directory -Path $exportsFolder
+$hasProfiles = ($directories | Measure-Object).Count -gt 0
+if(-not $hasProfiles) {
+ $directories = Get-Item -Path $exportsFolder
+}
+
+$docsFolder = Join-Path $PSScriptRoot 'docs'
+if(Test-Path $docsFolder) {
+ $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
+}
+$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue
+$examplesFolder = Join-Path $PSScriptRoot 'examples'
+
+$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.NetworkFunction.psd1')
+$modulePath = $modulePsd1.FullName
+$moduleName = $modulePsd1.BaseName
+
+# Load DLL to use build-time cmdlets
+Import-Module -Name $modulePath
+Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.NetworkFunction.private.dll')
+$instance = [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module]::Instance
+# Module info is shared per profile
+$moduleInfo = Get-Module -Name $moduleName
+
+foreach($directory in $directories)
+{
+ if($hasProfiles) {
+ Select-AzProfile -Name $directory.Name
+ }
+ # Reload module per profile
+ Import-Module -Name $modulePath -Force
+
+ $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName
+ $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full }
+ $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo
+
+ $docsPath = Join-Path $docsFolder $directory.Name
+ $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue
+ $examplesPath = Join-Path $examplesFolder $directory.Name
+
+ Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath
+ Write-Host -ForegroundColor Green "Created documentation in '$docsPath'"
+}
+
+Write-Host -ForegroundColor Green '-------------Done-------------'
\ No newline at end of file
diff --git a/src/NetworkFunction/generate-info.json b/src/NetworkFunction/generate-info.json
new file mode 100644
index 000000000000..f46372d7da29
--- /dev/null
+++ b/src/NetworkFunction/generate-info.json
@@ -0,0 +1,8 @@
+{
+ "swagger_commit": "51a3c36ac6076ac7be40423187f962b22ef01a54",
+ "node": "v14.15.5",
+ "autorest": "`-- (empty)",
+ "autorest_core": "3.8.4",
+ "autorest_modelerfour": "4.15.414",
+ "autorest_powershell": "3.0.490"
+}
diff --git a/src/NetworkFunction/generated/Module.cs b/src/NetworkFunction/generated/Module.cs
new file mode 100644
index 000000000000..dd478648b205
--- /dev/null
+++ b/src/NetworkFunction/generated/Module.cs
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+ using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+ using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>;
+ using GetParameterDelegate = global::System.Func;
+ using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using ArgumentCompleterDelegate = global::System.Func;
+ using GetTelemetryIdDelegate = global::System.Func;
+ using TelemetryDelegate = global::System.Action;
+ using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>;
+ using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>;
+ using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>;
+ using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>;
+
+ /// A class that contains the module-common code and data.
+ public partial class Module
+ {
+ /// The currently selected profile.
+ public string Profile = global::System.String.Empty;
+
+ public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler();
+
+ /// the ISendAsync pipeline instance
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline _pipeline;
+
+ /// the ISendAsync pipeline instance (when proxy is enabled)
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline _pipelineWithProxy;
+
+ public bool _useProxy = false;
+
+ public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy();
+
+ /// Gets completion data for azure specific fields
+ public ArgumentCompleterDelegate ArgumentCompleter { get; set; }
+
+ /// The instance of the Client API
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.NetworkFunction ClientAPI { get; set; }
+
+ /// A delegate that gets called for each signalled event
+ public EventListenerDelegate EventListener { get; set; }
+
+ /// The delegate to call to get parameter data from a common module.
+ public GetParameterDelegate GetParameterValue { get; set; }
+
+ /// The delegate to get the telemetry Id.
+ public GetTelemetryIdDelegate GetTelemetryId { get; set; }
+
+ /// Backing field for property.
+ private static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module _instance;
+
+ /// the singleton of this module class
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Module());
+
+ /// The Name of this module
+ public string Name => @"Az.NetworkFunction";
+
+ /// The delegate to call when this module is loaded (supporting a commmon module).
+ public ModuleLoadPipelineDelegate OnModuleLoad { get; set; }
+
+ /// The delegate to call before each new request (supporting a commmon module).
+ public NewRequestPipelineDelegate OnNewRequest { get; set; }
+
+ /// The name of the currently selected Azure profile
+ public global::System.String ProfileName { get; set; }
+
+ /// The ResourceID for this module (azure arm).
+ public string ResourceId => @"Az.NetworkFunction";
+
+ /// The delegate for creating a telemetry.
+ public TelemetryDelegate Telemetry { get; set; }
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline pipeline);
+
+ /// The from the cmdlet
+ /// The HttpPipeline for the request
+
+ partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline pipeline);
+
+ partial void CustomInit();
+
+ /// Creates an instance of the HttpPipeline for each call.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the cmdlet's parameterset name.
+ /// a dict for extensible parameters
+ /// An instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline for the remote call.
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null)
+ {
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline pipeline = null;
+ BeforeCreatePipeline(invocationInfo, ref pipeline);
+ pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone();
+ AfterCreatePipeline(invocationInfo, ref pipeline);
+ pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync);
+ OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } );
+ return pipeline;
+ }
+
+ /// Gets parameters from a common module.
+ /// The from the cmdlet
+ /// the cmdlet's correlation id.
+ /// The name of the parameter to get the value for.
+ ///
+ /// The parameter value from the common module. (Note: this should be type converted on the way back)
+ ///
+ public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName );
+
+ /// Initialization steps performed after the module is loaded.
+ public void Init()
+ {
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } );
+ OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } );
+ CustomInit();
+ }
+
+ /// Creates the module instance.
+ private Module()
+ {
+ // constructor
+ ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.NetworkFunction();
+ _handler.Proxy = _webProxy;
+ _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient()));
+ _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler)));
+ }
+
+ /// The HTTP Proxy to use.
+ /// The HTTP Proxy Credentials
+ /// True if the proxy should use default credentials
+ public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials)
+ {
+ _useProxy = proxy != null;
+ if (proxy == null)
+ {
+ return;
+ }
+ // set the proxy configuration
+ _webProxy.Address = proxy;
+ _webProxy.BypassProxyOnLocal = false;
+ if (proxyUseDefaultCredentials)
+ {
+ _webProxy.Credentials = null;
+ _webProxy.UseDefaultCredentials = true;
+ }
+ else
+ {
+ _webProxy.UseDefaultCredentials = false;
+ _webProxy.Credentials = proxyCredential ?.GetNetworkCredential();
+ }
+ }
+
+ /// Called to dispatch events to the common module listener
+ /// The ID of the event
+ /// The cancellation token for the event
+ /// A delegate to get the detailed event data
+ /// The callback for the event dispatcher
+ /// The from the cmdlet
+ /// the cmdlet's parameterset name.
+ /// the cmdlet's correlation id.
+ /// the cmdlet's process record correlation id.
+ /// the exception that is being thrown (if available)
+ ///
+ /// A that will be complete when handling of the event is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception)
+ {
+ using( NoSynchronizationContext )
+ {
+ await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.PowerShell.cs
new file mode 100644
index 000000000000..8c8688e53267
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.PowerShell.cs
@@ -0,0 +1,294 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Azure Traffic Collector resource.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorTypeConverter))]
+ public partial class AzureTrafficCollector
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AzureTrafficCollector(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Etag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Etag, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("VirtualHub"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHub = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference) content.GetValueForProperty("VirtualHub",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHub, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CollectorPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).CollectorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("CollectorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).CollectorPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("VirtualHubId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHubId = (string) content.GetValueForProperty("VirtualHubId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHubId, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal AzureTrafficCollector(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Etag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).Etag, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("VirtualHub"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHub = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference) content.GetValueForProperty("VirtualHub",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHub, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CollectorPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).CollectorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("CollectorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).CollectorPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("VirtualHubId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHubId = (string) content.GetValueForProperty("VirtualHubId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal)this).VirtualHubId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AzureTrafficCollector(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AzureTrafficCollector(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Azure Traffic Collector resource.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorTypeConverter))]
+ public partial interface IAzureTrafficCollector
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.TypeConverter.cs
new file mode 100644
index 000000000000..c8ac6c55eccb
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AzureTrafficCollectorTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AzureTrafficCollector.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollector.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollector.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.cs
new file mode 100644
index 000000000000..8b3032f5f460
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector resource.
+ public partial class AzureTrafficCollector :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResource();
+
+ /// Collector Policies for Azure Traffic Collector.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).CollectorPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).CollectorPolicy = value ?? null /* arrayOf */; }
+
+ /// Backing field for property.
+ private string _etag;
+
+ /// A unique read-only string that changes whenever the resource is updated.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Etag { get => this._etag; }
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Id; }
+
+ /// Resource location.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Location = value ?? null; }
+
+ /// Internal Acessors for Etag
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal.Etag { get => this._etag; set { {_etag = value;} } }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormat()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for VirtualHub
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal.VirtualHub { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).VirtualHub; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).VirtualHub = value; }
+
+ /// Internal Acessors for VirtualHubId
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorInternal.VirtualHubId { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).VirtualHubId; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).VirtualHubId = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Name = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemData = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Type = value; }
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat _property;
+
+ /// Properties of the Azure Traffic Collector.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormat()); set => this._property = value; }
+
+ /// The provisioning state of the application rule collection resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemData; }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; }
+
+ /// Resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)__trackedResource).Type; }
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string VirtualHubId { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)Property).VirtualHubId; }
+
+ /// Creates an new instance.
+ public AzureTrafficCollector()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource);
+ await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource);
+ }
+ }
+ /// Azure Traffic Collector resource.
+ public partial interface IAzureTrafficCollector :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource
+ {
+ /// Collector Policies for Azure Traffic Collector.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Collector Policies for Azure Traffic Collector.",
+ SerializedName = @"collectorPolicies",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get; set; }
+ /// A unique read-only string that changes whenever the resource is updated.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"A unique read-only string that changes whenever the resource is updated.",
+ SerializedName = @"etag",
+ PossibleTypes = new [] { typeof(string) })]
+ string Etag { get; }
+ /// The provisioning state of the application rule collection resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The provisioning state of the application rule collection resource.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; }
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string VirtualHubId { get; }
+
+ }
+ /// Azure Traffic Collector resource.
+ internal partial interface IAzureTrafficCollectorInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal
+ {
+ /// Collector Policies for Azure Traffic Collector.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get; set; }
+ /// A unique read-only string that changes whenever the resource is updated.
+ string Etag { get; set; }
+ /// Properties of the Azure Traffic Collector.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat Property { get; set; }
+ /// The provisioning state of the application rule collection resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// The virtualHub to which the Azure Traffic Collector belongs.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference VirtualHub { get; set; }
+ /// Resource ID.
+ string VirtualHubId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.json.cs
new file mode 100644
index 000000000000..777f55005ed9
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollector.json.cs
@@ -0,0 +1,115 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector resource.
+ public partial class AzureTrafficCollector
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal AzureTrafficCollector(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorPropertiesFormat.FromJson(__jsonProperties) : Property;}
+ {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new AzureTrafficCollector(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __trackedResource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.PowerShell.cs
new file mode 100644
index 000000000000..1f0225b6718c
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.PowerShell.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Response for the ListTrafficCollectors API service call.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorListResultTypeConverter))]
+ public partial class AzureTrafficCollectorListResult
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AzureTrafficCollectorListResult(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal AzureTrafficCollectorListResult(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollectorTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AzureTrafficCollectorListResult(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AzureTrafficCollectorListResult(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Response for the ListTrafficCollectors API service call.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorListResultTypeConverter))]
+ public partial interface IAzureTrafficCollectorListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.TypeConverter.cs
new file mode 100644
index 000000000000..cf0f5c17a2e9
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AzureTrafficCollectorListResultTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AzureTrafficCollectorListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollectorListResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollectorListResult.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.cs
new file mode 100644
index 000000000000..d6f2659d8745
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Response for the ListTrafficCollectors API service call.
+ public partial class AzureTrafficCollectorListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The URL to get the next set of results.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[] _value;
+
+ /// A list of Traffic Collector resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public AzureTrafficCollectorListResult()
+ {
+
+ }
+ }
+ /// Response for the ListTrafficCollectors API service call.
+ public partial interface IAzureTrafficCollectorListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// The URL to get the next set of results.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The URL to get the next set of results.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// A list of Traffic Collector resources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A list of Traffic Collector resources.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[] Value { get; set; }
+
+ }
+ /// Response for the ListTrafficCollectors API service call.
+ internal partial interface IAzureTrafficCollectorListResultInternal
+
+ {
+ /// The URL to get the next set of results.
+ string NextLink { get; set; }
+ /// A list of Traffic Collector resources.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.json.cs
new file mode 100644
index 000000000000..0f6209828390
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorListResult.json.cs
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Response for the ListTrafficCollectors API service call.
+ public partial class AzureTrafficCollectorListResult
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal AzureTrafficCollectorListResult(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollector) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.AzureTrafficCollector.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new AzureTrafficCollectorListResult(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.PowerShell.cs
new file mode 100644
index 000000000000..860f863adddd
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.PowerShell.cs
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Azure Traffic Collector resource properties.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorPropertiesFormatTypeConverter))]
+ public partial class AzureTrafficCollectorPropertiesFormat
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal AzureTrafficCollectorPropertiesFormat(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("VirtualHub"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHub = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference) content.GetValueForProperty("VirtualHub",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHub, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CollectorPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).CollectorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("CollectorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).CollectorPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("VirtualHubId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHubId = (string) content.GetValueForProperty("VirtualHubId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHubId, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal AzureTrafficCollectorPropertiesFormat(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("VirtualHub"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHub = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference) content.GetValueForProperty("VirtualHub",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHub, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReferenceTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("CollectorPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).CollectorPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("CollectorPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).CollectorPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("VirtualHubId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHubId = (string) content.GetValueForProperty("VirtualHubId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal)this).VirtualHubId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new AzureTrafficCollectorPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new AzureTrafficCollectorPropertiesFormat(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json
+ /// string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ ///
+ /// an instance of the model class.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Azure Traffic Collector resource properties.
+ [System.ComponentModel.TypeConverter(typeof(AzureTrafficCollectorPropertiesFormatTypeConverter))]
+ public partial interface IAzureTrafficCollectorPropertiesFormat
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.TypeConverter.cs
new file mode 100644
index 000000000000..72d720bae4fa
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.TypeConverter.cs
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class AzureTrafficCollectorPropertiesFormatTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise
+ /// false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return AzureTrafficCollectorPropertiesFormat.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollectorPropertiesFormat.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return AzureTrafficCollectorPropertiesFormat.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.cs
new file mode 100644
index 000000000000..f857a65f6dd0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.cs
@@ -0,0 +1,100 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector resource properties.
+ public partial class AzureTrafficCollectorPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] _collectorPolicy;
+
+ /// Collector Policies for Azure Traffic Collector.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get => this._collectorPolicy; set => this._collectorPolicy = value; }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Internal Acessors for VirtualHub
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal.VirtualHub { get => (this._virtualHub = this._virtualHub ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReference()); set { {_virtualHub = value;} } }
+
+ /// Internal Acessors for VirtualHubId
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormatInternal.VirtualHubId { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)VirtualHub).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)VirtualHub).Id = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? _provisioningState;
+
+ /// The provisioning state of the application rule collection resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference _virtualHub;
+
+ /// The virtualHub to which the Azure Traffic Collector belongs.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference VirtualHub { get => (this._virtualHub = this._virtualHub ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReference()); set => this._virtualHub = value; }
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string VirtualHubId { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)VirtualHub).Id; }
+
+ /// Creates an new instance.
+ public AzureTrafficCollectorPropertiesFormat()
+ {
+
+ }
+ }
+ /// Azure Traffic Collector resource properties.
+ public partial interface IAzureTrafficCollectorPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Collector Policies for Azure Traffic Collector.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Collector Policies for Azure Traffic Collector.",
+ SerializedName = @"collectorPolicies",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get; set; }
+ /// The provisioning state of the application rule collection resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The provisioning state of the application rule collection resource.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; }
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string VirtualHubId { get; }
+
+ }
+ /// Azure Traffic Collector resource properties.
+ internal partial interface IAzureTrafficCollectorPropertiesFormatInternal
+
+ {
+ /// Collector Policies for Azure Traffic Collector.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] CollectorPolicy { get; set; }
+ /// The provisioning state of the application rule collection resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// The virtualHub to which the Azure Traffic Collector belongs.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference VirtualHub { get; set; }
+ /// Resource ID.
+ string VirtualHubId { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.json.cs
new file mode 100644
index 000000000000..9f5e07dae771
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/AzureTrafficCollectorPropertiesFormat.json.cs
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector resource properties.
+ public partial class AzureTrafficCollectorPropertiesFormat
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal AzureTrafficCollectorPropertiesFormat(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_virtualHub = If( json?.PropertyT("virtualHub"), out var __jsonVirtualHub) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ResourceReference.FromJson(__jsonVirtualHub) : VirtualHub;}
+ {_collectorPolicy = If( json?.PropertyT("collectorPolicies"), out var __jsonCollectorPolicies) ? If( __jsonCollectorPolicies as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicy.FromJson(__u) )) ))() : null : CollectorPolicy;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IAzureTrafficCollectorPropertiesFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new AzureTrafficCollectorPropertiesFormat(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._virtualHub ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._virtualHub.ToJson(null,serializationMode) : null, "virtualHub" ,container.Add );
+ if (null != this._collectorPolicy)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._collectorPolicy )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("collectorPolicies",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.PowerShell.cs
new file mode 100644
index 000000000000..30ca498e90b3
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.PowerShell.cs
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// An error response from the service.
+ [System.ComponentModel.TypeConverter(typeof(CloudErrorTypeConverter))]
+ public partial class CloudError
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CloudError(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CloudError(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Error"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CloudError(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CloudError(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// An error response from the service.
+ [System.ComponentModel.TypeConverter(typeof(CloudErrorTypeConverter))]
+ public partial interface ICloudError
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.TypeConverter.cs
new file mode 100644
index 000000000000..247d433d57c7
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CloudErrorTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CloudError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CloudError.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CloudError.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.cs
new file mode 100644
index 000000000000..ab66c8fe9380
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An error response from the service.
+ public partial class CloudError :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal
+ {
+
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Code = value ?? null; }
+
+ /// A list of additional details about the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody _error;
+
+ /// An error response from the service.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody()); set => this._error = value; }
+
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Message = value ?? null; }
+
+ /// Internal Acessors for Error
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody()); set { {_error = value;} } }
+
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)Error).Target = value ?? null; }
+
+ /// Creates an new instance.
+ public CloudError()
+ {
+
+ }
+ }
+ /// An error response from the service.
+ public partial interface ICloudError :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// A list of additional details about the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A list of additional details about the error.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get; set; }
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A message describing the error, intended to be suitable for display in a user interface.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The target of the particular error. For example, the name of the property in error.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; set; }
+
+ }
+ /// An error response from the service.
+ internal partial interface ICloudErrorInternal
+
+ {
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ string Code { get; set; }
+ /// A list of additional details about the error.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get; set; }
+ /// An error response from the service.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody Error { get; set; }
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ string Message { get; set; }
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.json.cs
new file mode 100644
index 000000000000..31f41fa637d7
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudError.json.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An error response from the service.
+ public partial class CloudError
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CloudError(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody.FromJson(__jsonError) : Error;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CloudError(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.PowerShell.cs
new file mode 100644
index 000000000000..edca6526e27c
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.PowerShell.cs
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// An error response from the service.
+ [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyTypeConverter))]
+ public partial class CloudErrorBody
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CloudErrorBody(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CloudErrorBody(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Code"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString);
+ }
+ if (content.Contains("Message"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString);
+ }
+ if (content.Contains("Target"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString);
+ }
+ if (content.Contains("Detail"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBodyTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CloudErrorBody(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CloudErrorBody(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// An error response from the service.
+ [System.ComponentModel.TypeConverter(typeof(CloudErrorBodyTypeConverter))]
+ public partial interface ICloudErrorBody
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.TypeConverter.cs
new file mode 100644
index 000000000000..d55ea14df13b
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CloudErrorBodyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CloudErrorBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CloudErrorBody.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CloudErrorBody.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.cs
new file mode 100644
index 000000000000..c227bec85384
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An error response from the service.
+ public partial class CloudErrorBody :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBodyInternal
+ {
+
+ /// Backing field for property.
+ private string _code;
+
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Code { get => this._code; set => this._code = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] _detail;
+
+ /// A list of additional details about the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; }
+
+ /// Backing field for property.
+ private string _message;
+
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Message { get => this._message; set => this._message = value; }
+
+ /// Backing field for property.
+ private string _target;
+
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Target { get => this._target; set => this._target = value; }
+
+ /// Creates an new instance.
+ public CloudErrorBody()
+ {
+
+ }
+ }
+ /// An error response from the service.
+ public partial interface ICloudErrorBody :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"An identifier for the error. Codes are invariant and are intended to be consumed programmatically.",
+ SerializedName = @"code",
+ PossibleTypes = new [] { typeof(string) })]
+ string Code { get; set; }
+ /// A list of additional details about the error.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A list of additional details about the error.",
+ SerializedName = @"details",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get; set; }
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A message describing the error, intended to be suitable for display in a user interface.",
+ SerializedName = @"message",
+ PossibleTypes = new [] { typeof(string) })]
+ string Message { get; set; }
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The target of the particular error. For example, the name of the property in error.",
+ SerializedName = @"target",
+ PossibleTypes = new [] { typeof(string) })]
+ string Target { get; set; }
+
+ }
+ /// An error response from the service.
+ internal partial interface ICloudErrorBodyInternal
+
+ {
+ ///
+ /// An identifier for the error. Codes are invariant and are intended to be consumed programmatically.
+ ///
+ string Code { get; set; }
+ /// A list of additional details about the error.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody[] Detail { get; set; }
+ ///
+ /// A message describing the error, intended to be suitable for display in a user interface.
+ ///
+ string Message { get; set; }
+ ///
+ /// The target of the particular error. For example, the name of the property in error.
+ ///
+ string Target { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.json.cs
new file mode 100644
index 000000000000..539f12c97cf4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CloudErrorBody.json.cs
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An error response from the service.
+ public partial class CloudErrorBody
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;}
+ {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;}
+ {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;}
+ {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CloudErrorBody(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add );
+ AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add );
+ AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add );
+ if (null != this._detail)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._detail )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("details",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.PowerShell.cs
new file mode 100644
index 000000000000..f5d7c0e6a136
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.PowerShell.cs
@@ -0,0 +1,284 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Collector policy resource.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyTypeConverter))]
+ public partial class CollectorPolicy
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CollectorPolicy(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Etag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Etag, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("IngestionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat) content.GetValueForProperty("IngestionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicy, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EmissionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).EmissionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]) content.GetValueForProperty("EmissionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).EmissionPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("IngestionPolicyIngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionPolicyIngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionPolicyIngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CollectorPolicy(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Property"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Etag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Etag = (string) content.GetValueForProperty("Etag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).Etag, global::System.Convert.ToString);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("IngestionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat) content.GetValueForProperty("IngestionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicy, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EmissionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).EmissionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]) content.GetValueForProperty("EmissionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).EmissionPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("IngestionPolicyIngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionPolicyIngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionPolicyIngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal)this).IngestionPolicyIngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CollectorPolicy(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CollectorPolicy(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Collector policy resource.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyTypeConverter))]
+ public partial interface ICollectorPolicy
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.TypeConverter.cs
new file mode 100644
index 000000000000..de2220e41dbb
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CollectorPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CollectorPolicy.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CollectorPolicy.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CollectorPolicy.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.cs
new file mode 100644
index 000000000000..7c6abbd83900
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.cs
@@ -0,0 +1,256 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Collector policy resource.
+ public partial class CollectorPolicy :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ProxyResource();
+
+ /// Emission policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).EmissionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).EmissionPolicy = value ?? null /* arrayOf */; }
+
+ /// Backing field for property.
+ private string _etag;
+
+ /// A unique read-only string that changes whenever the resource is updated.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Etag { get => this._etag; }
+
+ /// Azure resource Id
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Id; }
+
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicyIngestionSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicyIngestionSource = value ?? null /* arrayOf */; }
+
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicyIngestionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicyIngestionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType)""); }
+
+ /// Internal Acessors for Etag
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal.Etag { get => this._etag; set { {_etag = value;} } }
+
+ /// Internal Acessors for IngestionPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal.IngestionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).IngestionPolicy = value; }
+
+ /// Internal Acessors for Property
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormat()); set { {_property = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).ProvisioningState = value; }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData()); set { {_systemData = value;} } }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Id = value; }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Name = value; }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Type = value; }
+
+ /// Azure resource name
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat _property;
+
+ /// Properties of the Collector Policy.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormat()); set => this._property = value; }
+
+ /// The provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)Property).ProvisioningState; }
+
+ /// Gets the resource group name
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string ResourceGroupName { get => (new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Success ? new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(this.Id).Groups["resourceGroupName"].Value : null); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData _systemData;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData()); }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// Azure resource type
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)__proxyResource).Type; }
+
+ /// Creates an new instance.
+ public CollectorPolicy()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__proxyResource), __proxyResource);
+ await eventListener.AssertObjectIsValid(nameof(__proxyResource), __proxyResource);
+ }
+ }
+ /// Collector policy resource.
+ public partial interface ICollectorPolicy :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource
+ {
+ /// Emission policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Emission policies.",
+ SerializedName = @"emissionPolicies",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get; set; }
+ /// A unique read-only string that changes whenever the resource is updated.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"A unique read-only string that changes whenever the resource is updated.",
+ SerializedName = @"etag",
+ PossibleTypes = new [] { typeof(string) })]
+ string Etag { get; }
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Ingestion Sources.",
+ SerializedName = @"ingestionSources",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get; set; }
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The ingestion type.",
+ SerializedName = @"ingestionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get; set; }
+ /// The provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; }
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource creation (UTC).",
+ SerializedName = @"createdAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that created the resource.",
+ SerializedName = @"createdBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that created the resource.",
+ SerializedName = @"createdByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that last modified the resource.",
+ SerializedName = @"lastModifiedBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that last modified the resource.",
+ SerializedName = @"lastModifiedByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+
+ }
+ /// Collector policy resource.
+ internal partial interface ICollectorPolicyInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal
+ {
+ /// Emission policies.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get; set; }
+ /// A unique read-only string that changes whenever the resource is updated.
+ string Etag { get; set; }
+ /// Ingestion policies.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat IngestionPolicy { get; set; }
+ /// Ingestion Sources.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get; set; }
+ /// The ingestion type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get; set; }
+ /// Properties of the Collector Policy.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat Property { get; set; }
+ /// The provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; set; }
+ /// Metadata pertaining to creation and last modification of the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData SystemData { get; set; }
+ /// The timestamp of resource creation (UTC).
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.json.cs
new file mode 100644
index 000000000000..51f76916c4dc
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicy.json.cs
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Collector policy resource.
+ public partial class CollectorPolicy
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CollectorPolicy(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ProxyResource(json);
+ {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyPropertiesFormat.FromJson(__jsonProperties) : Property;}
+ {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData.FromJson(__jsonSystemData) : SystemData;}
+ {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)Etag;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CollectorPolicy(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __proxyResource?.ToJson(container, serializationMode);
+ AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add );
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._etag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._etag.ToString()) : null, "etag" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.PowerShell.cs
new file mode 100644
index 000000000000..c52cdca71f00
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.PowerShell.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Response for the ListCollectorPolicies API service call.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyListResultTypeConverter))]
+ public partial class CollectorPolicyListResult
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CollectorPolicyListResult(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CollectorPolicyListResult(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicyTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CollectorPolicyListResult(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CollectorPolicyListResult(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Response for the ListCollectorPolicies API service call.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyListResultTypeConverter))]
+ public partial interface ICollectorPolicyListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.TypeConverter.cs
new file mode 100644
index 000000000000..a17c53329731
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CollectorPolicyListResultTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CollectorPolicyListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CollectorPolicyListResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CollectorPolicyListResult.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.cs
new file mode 100644
index 000000000000..9f7368e75a3a
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.cs
@@ -0,0 +1,71 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Response for the ListCollectorPolicies API service call.
+ public partial class CollectorPolicyListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal
+ {
+
+ /// Internal Acessors for NextLink
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } }
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// The URL to get the next set of results.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] _value;
+
+ /// A list of collection policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public CollectorPolicyListResult()
+ {
+
+ }
+ }
+ /// Response for the ListCollectorPolicies API service call.
+ public partial interface ICollectorPolicyListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// The URL to get the next set of results.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The URL to get the next set of results.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; }
+ /// A list of collection policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"A list of collection policies.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] Value { get; set; }
+
+ }
+ /// Response for the ListCollectorPolicies API service call.
+ internal partial interface ICollectorPolicyListResultInternal
+
+ {
+ /// The URL to get the next set of results.
+ string NextLink { get; set; }
+ /// A list of collection policies.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.json.cs
new file mode 100644
index 000000000000..2cdebc464557
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyListResult.json.cs
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Response for the ListCollectorPolicies API service call.
+ public partial class CollectorPolicyListResult
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CollectorPolicyListResult(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicy) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.CollectorPolicy.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CollectorPolicyListResult(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.PowerShell.cs
new file mode 100644
index 000000000000..a9131e71f6ba
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.PowerShell.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Collection policy properties.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyPropertiesFormatTypeConverter))]
+ public partial class CollectorPolicyPropertiesFormat
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CollectorPolicyPropertiesFormat(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IngestionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat) content.GetValueForProperty("IngestionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicy, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EmissionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).EmissionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]) content.GetValueForProperty("EmissionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).EmissionPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionPolicyIngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionPolicyIngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CollectorPolicyPropertiesFormat(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IngestionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat) content.GetValueForProperty("IngestionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicy, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormatTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("EmissionPolicy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).EmissionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[]) content.GetValueForProperty("EmissionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).EmissionPolicy, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("ProvisioningState"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionPolicyIngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("IngestionPolicyIngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionPolicyIngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal)this).IngestionPolicyIngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CollectorPolicyPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CollectorPolicyPropertiesFormat(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Collection policy properties.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicyPropertiesFormatTypeConverter))]
+ public partial interface ICollectorPolicyPropertiesFormat
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.TypeConverter.cs
new file mode 100644
index 000000000000..593f12d2ebfa
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CollectorPolicyPropertiesFormatTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CollectorPolicyPropertiesFormat.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CollectorPolicyPropertiesFormat.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CollectorPolicyPropertiesFormat.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.cs
new file mode 100644
index 000000000000..9b325623b1e9
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Collection policy properties.
+ public partial class CollectorPolicyPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] _emissionPolicy;
+
+ /// Emission policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get => this._emissionPolicy; set => this._emissionPolicy = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat _ingestionPolicy;
+
+ /// Ingestion policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat IngestionPolicy { get => (this._ingestionPolicy = this._ingestionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormat()); set => this._ingestionPolicy = value; }
+
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)IngestionPolicy).IngestionSource; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)IngestionPolicy).IngestionSource = value ?? null /* arrayOf */; }
+
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)IngestionPolicy).IngestionType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)IngestionPolicy).IngestionType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType)""); }
+
+ /// Internal Acessors for IngestionPolicy
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal.IngestionPolicy { get => (this._ingestionPolicy = this._ingestionPolicy ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormat()); set { {_ingestionPolicy = value;} } }
+
+ /// Internal Acessors for ProvisioningState
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormatInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? _provisioningState;
+
+ /// The provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get => this._provisioningState; }
+
+ /// Creates an new instance.
+ public CollectorPolicyPropertiesFormat()
+ {
+
+ }
+ }
+ /// Collection policy properties.
+ public partial interface ICollectorPolicyPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Emission policies.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Emission policies.",
+ SerializedName = @"emissionPolicies",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get; set; }
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Ingestion Sources.",
+ SerializedName = @"ingestionSources",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get; set; }
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The ingestion type.",
+ SerializedName = @"ingestionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get; set; }
+ /// The provisioning state.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"The provisioning state.",
+ SerializedName = @"provisioningState",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; }
+
+ }
+ /// Collection policy properties.
+ internal partial interface ICollectorPolicyPropertiesFormatInternal
+
+ {
+ /// Emission policies.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat[] EmissionPolicy { get; set; }
+ /// Ingestion policies.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat IngestionPolicy { get; set; }
+ /// Ingestion Sources.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionPolicyIngestionSource { get; set; }
+ /// The ingestion type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionPolicyIngestionType { get; set; }
+ /// The provisioning state.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.ProvisioningState? ProvisioningState { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.json.cs
new file mode 100644
index 000000000000..b1c630717049
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicyPropertiesFormat.json.cs
@@ -0,0 +1,123 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Collection policy properties.
+ public partial class CollectorPolicyPropertiesFormat
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CollectorPolicyPropertiesFormat(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_ingestionPolicy = If( json?.PropertyT("ingestionPolicy"), out var __jsonIngestionPolicy) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionPolicyPropertiesFormat.FromJson(__jsonIngestionPolicy) : IngestionPolicy;}
+ {_emissionPolicy = If( json?.PropertyT("emissionPolicies"), out var __jsonEmissionPolicies) ? If( __jsonEmissionPolicies as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPoliciesPropertiesFormat.FromJson(__u) )) ))() : null : EmissionPolicy;}
+ {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicyPropertiesFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CollectorPolicyPropertiesFormat(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._ingestionPolicy ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._ingestionPolicy.ToJson(null,serializationMode) : null, "ingestionPolicy" ,container.Add );
+ if (null != this._emissionPolicy)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._emissionPolicy )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("emissionPolicies",__w);
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.PowerShell.cs
new file mode 100644
index 000000000000..ec5f1e0fa68c
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.PowerShell.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicySystemDataTypeConverter))]
+ public partial class CollectorPolicySystemData
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal CollectorPolicySystemData(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal CollectorPolicySystemData(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new CollectorPolicySystemData(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new CollectorPolicySystemData(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(CollectorPolicySystemDataTypeConverter))]
+ public partial interface ICollectorPolicySystemData
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.TypeConverter.cs
new file mode 100644
index 000000000000..077f4e303202
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class CollectorPolicySystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return CollectorPolicySystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return CollectorPolicySystemData.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return CollectorPolicySystemData.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.cs
new file mode 100644
index 000000000000..f7dc6c13c3a9
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class CollectorPolicySystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemDataInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData __systemData = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData();
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string CreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? CreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string LastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? LastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// Creates an new instance.
+ public CollectorPolicySystemData()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__systemData), __systemData);
+ await eventListener.AssertObjectIsValid(nameof(__systemData), __systemData);
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial interface ICollectorPolicySystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData
+ {
+
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ internal partial interface ICollectorPolicySystemDataInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.json.cs
new file mode 100644
index 000000000000..ab77695dffc8
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/CollectorPolicySystemData.json.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class CollectorPolicySystemData
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal CollectorPolicySystemData(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __systemData = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData(json);
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ICollectorPolicySystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new CollectorPolicySystemData(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __systemData?.ToJson(container, serializationMode);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.PowerShell.cs
new file mode 100644
index 000000000000..43ace3a35f6e
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.PowerShell.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Emission policy properties.
+ [System.ComponentModel.TypeConverter(typeof(EmissionPoliciesPropertiesFormatTypeConverter))]
+ public partial class EmissionPoliciesPropertiesFormat
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EmissionPoliciesPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EmissionPoliciesPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EmissionPoliciesPropertiesFormat(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("EmissionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType?) content.GetValueForProperty("EmissionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType.CreateFrom);
+ }
+ if (content.Contains("EmissionDestination"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionDestination = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[]) content.GetValueForProperty("EmissionDestination",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionDestination, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPolicyDestinationTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal EmissionPoliciesPropertiesFormat(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("EmissionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType?) content.GetValueForProperty("EmissionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType.CreateFrom);
+ }
+ if (content.Contains("EmissionDestination"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionDestination = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[]) content.GetValueForProperty("EmissionDestination",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal)this).EmissionDestination, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPolicyDestinationTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Emission policy properties.
+ [System.ComponentModel.TypeConverter(typeof(EmissionPoliciesPropertiesFormatTypeConverter))]
+ public partial interface IEmissionPoliciesPropertiesFormat
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.TypeConverter.cs
new file mode 100644
index 000000000000..24b65af990e4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EmissionPoliciesPropertiesFormatTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EmissionPoliciesPropertiesFormat.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EmissionPoliciesPropertiesFormat.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EmissionPoliciesPropertiesFormat.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.cs
new file mode 100644
index 000000000000..ded541944c50
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Emission policy properties.
+ public partial class EmissionPoliciesPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormatInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[] _emissionDestination;
+
+ /// Emission policy destinations.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[] EmissionDestination { get => this._emissionDestination; set => this._emissionDestination = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType? _emissionType;
+
+ /// Emission format type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType? EmissionType { get => this._emissionType; set => this._emissionType = value; }
+
+ /// Creates an new instance.
+ public EmissionPoliciesPropertiesFormat()
+ {
+
+ }
+ }
+ /// Emission policy properties.
+ public partial interface IEmissionPoliciesPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Emission policy destinations.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Emission policy destinations.",
+ SerializedName = @"emissionDestinations",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[] EmissionDestination { get; set; }
+ /// Emission format type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Emission format type.",
+ SerializedName = @"emissionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType? EmissionType { get; set; }
+
+ }
+ /// Emission policy properties.
+ internal partial interface IEmissionPoliciesPropertiesFormatInternal
+
+ {
+ /// Emission policy destinations.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination[] EmissionDestination { get; set; }
+ /// Emission format type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.EmissionType? EmissionType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.json.cs
new file mode 100644
index 000000000000..f1ea98d29d7d
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPoliciesPropertiesFormat.json.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Emission policy properties.
+ public partial class EmissionPoliciesPropertiesFormat
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal EmissionPoliciesPropertiesFormat(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_emissionType = If( json?.PropertyT("emissionType"), out var __jsonEmissionType) ? (string)__jsonEmissionType : (string)EmissionType;}
+ {_emissionDestination = If( json?.PropertyT("emissionDestinations"), out var __jsonEmissionDestinations) ? If( __jsonEmissionDestinations as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.EmissionPolicyDestination.FromJson(__u) )) ))() : null : EmissionDestination;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPoliciesPropertiesFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new EmissionPoliciesPropertiesFormat(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._emissionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._emissionType.ToString()) : null, "emissionType" ,container.Add );
+ if (null != this._emissionDestination)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._emissionDestination )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("emissionDestinations",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.PowerShell.cs
new file mode 100644
index 000000000000..b9521698540e
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.PowerShell.cs
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Emission policy destination properties.
+ [System.ComponentModel.TypeConverter(typeof(EmissionPolicyDestinationTypeConverter))]
+ public partial class EmissionPolicyDestination
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new EmissionPolicyDestination(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new EmissionPolicyDestination(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal EmissionPolicyDestination(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("DestinationType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestinationInternal)this).DestinationType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType?) content.GetValueForProperty("DestinationType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestinationInternal)this).DestinationType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal EmissionPolicyDestination(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("DestinationType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestinationInternal)this).DestinationType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType?) content.GetValueForProperty("DestinationType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestinationInternal)this).DestinationType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Emission policy destination properties.
+ [System.ComponentModel.TypeConverter(typeof(EmissionPolicyDestinationTypeConverter))]
+ public partial interface IEmissionPolicyDestination
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.TypeConverter.cs
new file mode 100644
index 000000000000..2254f79dc4d1
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class EmissionPolicyDestinationTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return EmissionPolicyDestination.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return EmissionPolicyDestination.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return EmissionPolicyDestination.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.cs
new file mode 100644
index 000000000000..fb84a4e13d55
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Emission policy destination properties.
+ public partial class EmissionPolicyDestination :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestinationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType? _destinationType;
+
+ /// Emission destination type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType? DestinationType { get => this._destinationType; set => this._destinationType = value; }
+
+ /// Creates an new instance.
+ public EmissionPolicyDestination()
+ {
+
+ }
+ }
+ /// Emission policy destination properties.
+ public partial interface IEmissionPolicyDestination :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Emission destination type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Emission destination type.",
+ SerializedName = @"destinationType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType? DestinationType { get; set; }
+
+ }
+ /// Emission policy destination properties.
+ internal partial interface IEmissionPolicyDestinationInternal
+
+ {
+ /// Emission destination type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.DestinationType? DestinationType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.json.cs
new file mode 100644
index 000000000000..cb008a7dd06d
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/EmissionPolicyDestination.json.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Emission policy destination properties.
+ public partial class EmissionPolicyDestination
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal EmissionPolicyDestination(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_destinationType = If( json?.PropertyT("destinationType"), out var __jsonDestinationType) ? (string)__jsonDestinationType : (string)DestinationType;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IEmissionPolicyDestination FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new EmissionPolicyDestination(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._destinationType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._destinationType.ToString()) : null, "destinationType" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.PowerShell.cs
new file mode 100644
index 000000000000..881f35378dfb
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.PowerShell.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Ingestion Policy properties.
+ [System.ComponentModel.TypeConverter(typeof(IngestionPolicyPropertiesFormatTypeConverter))]
+ public partial class IngestionPolicyPropertiesFormat
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new IngestionPolicyPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new IngestionPolicyPropertiesFormat(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal IngestionPolicyPropertiesFormat(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("IngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal IngestionPolicyPropertiesFormat(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("IngestionType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType?) content.GetValueForProperty("IngestionType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType.CreateFrom);
+ }
+ if (content.Contains("IngestionSource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionSource = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[]) content.GetValueForProperty("IngestionSource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal)this).IngestionSource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormatTypeConverter.ConvertFrom));
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Ingestion Policy properties.
+ [System.ComponentModel.TypeConverter(typeof(IngestionPolicyPropertiesFormatTypeConverter))]
+ public partial interface IIngestionPolicyPropertiesFormat
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.TypeConverter.cs
new file mode 100644
index 000000000000..197fc55fa29a
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class IngestionPolicyPropertiesFormatTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return IngestionPolicyPropertiesFormat.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return IngestionPolicyPropertiesFormat.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return IngestionPolicyPropertiesFormat.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.cs
new file mode 100644
index 000000000000..d891bbbeb9d0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Ingestion Policy properties.
+ public partial class IngestionPolicyPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormatInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] _ingestionSource;
+
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionSource { get => this._ingestionSource; set => this._ingestionSource = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? _ingestionType;
+
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionType { get => this._ingestionType; set => this._ingestionType = value; }
+
+ /// Creates an new instance.
+ public IngestionPolicyPropertiesFormat()
+ {
+
+ }
+ }
+ /// Ingestion Policy properties.
+ public partial interface IIngestionPolicyPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Ingestion Sources.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Ingestion Sources.",
+ SerializedName = @"ingestionSources",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionSource { get; set; }
+ /// The ingestion type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The ingestion type.",
+ SerializedName = @"ingestionType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionType { get; set; }
+
+ }
+ /// Ingestion Policy properties.
+ internal partial interface IIngestionPolicyPropertiesFormatInternal
+
+ {
+ /// Ingestion Sources.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat[] IngestionSource { get; set; }
+ /// The ingestion type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.IngestionType? IngestionType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.json.cs
new file mode 100644
index 000000000000..77e24d337397
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionPolicyPropertiesFormat.json.cs
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Ingestion Policy properties.
+ public partial class IngestionPolicyPropertiesFormat
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionPolicyPropertiesFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new IngestionPolicyPropertiesFormat(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal IngestionPolicyPropertiesFormat(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_ingestionType = If( json?.PropertyT("ingestionType"), out var __jsonIngestionType) ? (string)__jsonIngestionType : (string)IngestionType;}
+ {_ingestionSource = If( json?.PropertyT("ingestionSources"), out var __jsonIngestionSources) ? If( __jsonIngestionSources as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IngestionSourcesPropertiesFormat.FromJson(__u) )) ))() : null : IngestionSource;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._ingestionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._ingestionType.ToString()) : null, "ingestionType" ,container.Add );
+ if (null != this._ingestionSource)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._ingestionSource )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("ingestionSources",__w);
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.PowerShell.cs
new file mode 100644
index 000000000000..b210d4034a1c
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.PowerShell.cs
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Ingestion policy properties.
+ [System.ComponentModel.TypeConverter(typeof(IngestionSourcesPropertiesFormatTypeConverter))]
+ public partial class IngestionSourcesPropertiesFormat
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new IngestionSourcesPropertiesFormat(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new IngestionSourcesPropertiesFormat(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal IngestionSourcesPropertiesFormat(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType?) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType.CreateFrom);
+ }
+ if (content.Contains("ResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).ResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal IngestionSourcesPropertiesFormat(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SourceType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).SourceType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType?) content.GetValueForProperty("SourceType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).SourceType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType.CreateFrom);
+ }
+ if (content.Contains("ResourceId"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal)this).ResourceId, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Ingestion policy properties.
+ [System.ComponentModel.TypeConverter(typeof(IngestionSourcesPropertiesFormatTypeConverter))]
+ public partial interface IIngestionSourcesPropertiesFormat
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.TypeConverter.cs
new file mode 100644
index 000000000000..731778ccbad0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.TypeConverter.cs
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class IngestionSourcesPropertiesFormatTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return IngestionSourcesPropertiesFormat.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return IngestionSourcesPropertiesFormat.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return IngestionSourcesPropertiesFormat.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.cs
new file mode 100644
index 000000000000..607dacb06e75
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Ingestion policy properties.
+ public partial class IngestionSourcesPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormatInternal
+ {
+
+ /// Backing field for property.
+ private string _resourceId;
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string ResourceId { get => this._resourceId; set => this._resourceId = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType? _sourceType;
+
+ /// Ingestion source type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType? SourceType { get => this._sourceType; set => this._sourceType = value; }
+
+ /// Creates an new instance.
+ public IngestionSourcesPropertiesFormat()
+ {
+
+ }
+ }
+ /// Ingestion policy properties.
+ public partial interface IIngestionSourcesPropertiesFormat :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource ID.",
+ SerializedName = @"resourceId",
+ PossibleTypes = new [] { typeof(string) })]
+ string ResourceId { get; set; }
+ /// Ingestion source type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Ingestion source type.",
+ SerializedName = @"sourceType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType? SourceType { get; set; }
+
+ }
+ /// Ingestion policy properties.
+ internal partial interface IIngestionSourcesPropertiesFormatInternal
+
+ {
+ /// Resource ID.
+ string ResourceId { get; set; }
+ /// Ingestion source type.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.SourceType? SourceType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.json.cs
new file mode 100644
index 000000000000..81d202ba1f75
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/IngestionSourcesPropertiesFormat.json.cs
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Ingestion policy properties.
+ public partial class IngestionSourcesPropertiesFormat
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IIngestionSourcesPropertiesFormat FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new IngestionSourcesPropertiesFormat(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal IngestionSourcesPropertiesFormat(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_sourceType = If( json?.PropertyT("sourceType"), out var __jsonSourceType) ? (string)__jsonSourceType : (string)SourceType;}
+ {_resourceId = If( json?.PropertyT("resourceId"), out var __jsonResourceId) ? (string)__jsonResourceId : (string)ResourceId;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._sourceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._sourceType.ToString()) : null, "sourceType" ,container.Add );
+ AddIf( null != (((object)this._resourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._resourceId.ToString()) : null, "resourceId" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/Operation.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.PowerShell.cs
new file mode 100644
index 000000000000..923c971e4607
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.PowerShell.cs
@@ -0,0 +1,220 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Azure Traffic Collector REST API operation definition.
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial class Operation
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new Operation(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new Operation(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal Operation(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Display"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal Operation(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Display"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplayTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("IsDataAction"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
+ }
+ if (content.Contains("Origin"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).Origin, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayProvider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayResource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayResource, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayOperation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString);
+ }
+ if (content.Contains("DisplayDescription"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Azure Traffic Collector REST API operation definition.
+ [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))]
+ public partial interface IOperation
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/Operation.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.TypeConverter.cs
new file mode 100644
index 000000000000..4ddc7728f7b0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return Operation.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/Operation.cs b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.cs
new file mode 100644
index 000000000000..dc0d8d73f379
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.cs
@@ -0,0 +1,153 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector REST API operation definition.
+ public partial class Operation :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay _display;
+
+ /// Display metadata associated with the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplay()); set => this._display = value; }
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Description = value ?? null; }
+
+ /// Type of operation: get, read, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Operation = value ?? null; }
+
+ /// Service provider: Microsoft NetworkFunction.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Provider = value ?? null; }
+
+ /// Resource on which the operation is performed etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)Display).Resource = value ?? null; }
+
+ /// Backing field for property.
+ private bool? _isDataAction;
+
+ /// Indicates whether the operation is a data action
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public bool? IsDataAction { get => this._isDataAction; set => this._isDataAction = value; }
+
+ /// Internal Acessors for Display
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplay()); set { {_display = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Operation name: {provider}/{resource}/{operation}
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Name { get => this._name; set => this._name = value; }
+
+ /// Backing field for property.
+ private string _origin;
+
+ /// Origin of the operation
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Origin { get => this._origin; set => this._origin = value; }
+
+ /// Creates an new instance.
+ public Operation()
+ {
+
+ }
+ }
+ /// Azure Traffic Collector REST API operation definition.
+ public partial interface IOperation :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayDescription { get; set; }
+ /// Type of operation: get, read, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of operation: get, read, delete, etc.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayOperation { get; set; }
+ /// Service provider: Microsoft NetworkFunction.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service provider: Microsoft NetworkFunction.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayProvider { get; set; }
+ /// Resource on which the operation is performed etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource on which the operation is performed etc.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string DisplayResource { get; set; }
+ /// Indicates whether the operation is a data action
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Indicates whether the operation is a data action",
+ SerializedName = @"isDataAction",
+ PossibleTypes = new [] { typeof(bool) })]
+ bool? IsDataAction { get; set; }
+ /// Operation name: {provider}/{resource}/{operation}
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Operation name: {provider}/{resource}/{operation}",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; set; }
+ /// Origin of the operation
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Origin of the operation",
+ SerializedName = @"origin",
+ PossibleTypes = new [] { typeof(string) })]
+ string Origin { get; set; }
+
+ }
+ /// Azure Traffic Collector REST API operation definition.
+ internal partial interface IOperationInternal
+
+ {
+ /// Display metadata associated with the operation.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay Display { get; set; }
+ /// Description of the operation.
+ string DisplayDescription { get; set; }
+ /// Type of operation: get, read, delete, etc.
+ string DisplayOperation { get; set; }
+ /// Service provider: Microsoft NetworkFunction.
+ string DisplayProvider { get; set; }
+ /// Resource on which the operation is performed etc.
+ string DisplayResource { get; set; }
+ /// Indicates whether the operation is a data action
+ bool? IsDataAction { get; set; }
+ /// Operation name: {provider}/{resource}/{operation}
+ string Name { get; set; }
+ /// Origin of the operation
+ string Origin { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/Operation.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.json.cs
new file mode 100644
index 000000000000..0d4e922b5566
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/Operation.json.cs
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Azure Traffic Collector REST API operation definition.
+ public partial class Operation
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new Operation(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal Operation(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationDisplay.FromJson(__jsonDisplay) : Display;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;}
+ {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add );
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add );
+ AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.PowerShell.cs
new file mode 100644
index 000000000000..5666c3f573c4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.PowerShell.cs
@@ -0,0 +1,188 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Display metadata associated with the operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationDisplay(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationDisplay(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationDisplay(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Provider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal OperationDisplay(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Provider"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString);
+ }
+ if (content.Contains("Resource"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString);
+ }
+ if (content.Contains("Operation"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString);
+ }
+ if (content.Contains("Description"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal)this).Description, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Display metadata associated with the operation.
+ [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))]
+ public partial interface IOperationDisplay
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.TypeConverter.cs
new file mode 100644
index 000000000000..7334cc7016b6
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationDisplay.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.cs
new file mode 100644
index 000000000000..123b492a1678
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.cs
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Display metadata associated with the operation.
+ public partial class OperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplayInternal
+ {
+
+ /// Backing field for property.
+ private string _description;
+
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Description { get => this._description; set => this._description = value; }
+
+ /// Backing field for property.
+ private string _operation;
+
+ /// Type of operation: get, read, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Operation { get => this._operation; set => this._operation = value; }
+
+ /// Backing field for property.
+ private string _provider;
+
+ /// Service provider: Microsoft NetworkFunction.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Provider { get => this._provider; set => this._provider = value; }
+
+ /// Backing field for property.
+ private string _resource;
+
+ /// Resource on which the operation is performed etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Resource { get => this._resource; set => this._resource = value; }
+
+ /// Creates an new instance.
+ public OperationDisplay()
+ {
+
+ }
+ }
+ /// Display metadata associated with the operation.
+ public partial interface IOperationDisplay :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Description of the operation.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Description of the operation.",
+ SerializedName = @"description",
+ PossibleTypes = new [] { typeof(string) })]
+ string Description { get; set; }
+ /// Type of operation: get, read, delete, etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Type of operation: get, read, delete, etc.",
+ SerializedName = @"operation",
+ PossibleTypes = new [] { typeof(string) })]
+ string Operation { get; set; }
+ /// Service provider: Microsoft NetworkFunction.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Service provider: Microsoft NetworkFunction.",
+ SerializedName = @"provider",
+ PossibleTypes = new [] { typeof(string) })]
+ string Provider { get; set; }
+ /// Resource on which the operation is performed etc.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource on which the operation is performed etc.",
+ SerializedName = @"resource",
+ PossibleTypes = new [] { typeof(string) })]
+ string Resource { get; set; }
+
+ }
+ /// Display metadata associated with the operation.
+ internal partial interface IOperationDisplayInternal
+
+ {
+ /// Description of the operation.
+ string Description { get; set; }
+ /// Type of operation: get, read, delete, etc.
+ string Operation { get; set; }
+ /// Service provider: Microsoft NetworkFunction.
+ string Provider { get; set; }
+ /// Resource on which the operation is performed etc.
+ string Resource { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.json.cs
new file mode 100644
index 000000000000..57f2ef49d1c8
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationDisplay.json.cs
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Display metadata associated with the operation.
+ public partial class OperationDisplay
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;}
+ {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;}
+ {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;}
+ {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add );
+ AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add );
+ AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add );
+ AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.PowerShell.cs
new file mode 100644
index 000000000000..a87ffbda925b
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.PowerShell.cs
@@ -0,0 +1,178 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ ///
+ [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))]
+ public partial class OperationListResult
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new OperationListResult(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new OperationListResult(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal OperationListResult(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal OperationListResult(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Value"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.OperationTypeConverter.ConvertFrom));
+ }
+ if (content.Contains("NextLink"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))]
+ public partial interface IOperationListResult
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.TypeConverter.cs
new file mode 100644
index 000000000000..4ae61a42cf89
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return OperationListResult.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return OperationListResult.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.cs
new file mode 100644
index 000000000000..34ef34005b17
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ ///
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ ///
+ public partial class OperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResultInternal
+ {
+
+ /// Backing field for property.
+ private string _nextLink;
+
+ /// URL to get the next set of operation list results if there are any.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string NextLink { get => this._nextLink; set => this._nextLink = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[] _value;
+
+ /// List of operations supported by the Azure Traffic Collector resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[] Value { get => this._value; set => this._value = value; }
+
+ /// Creates an new instance.
+ public OperationListResult()
+ {
+
+ }
+ }
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ public partial interface IOperationListResult :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// URL to get the next set of operation list results if there are any.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"URL to get the next set of operation list results if there are any.",
+ SerializedName = @"nextLink",
+ PossibleTypes = new [] { typeof(string) })]
+ string NextLink { get; set; }
+ /// List of operations supported by the Azure Traffic Collector resource provider.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"List of operations supported by the Azure Traffic Collector resource provider.",
+ SerializedName = @"value",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[] Value { get; set; }
+
+ }
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ internal partial interface IOperationListResultInternal
+
+ {
+ /// URL to get the next set of operation list results if there are any.
+ string NextLink { get; set; }
+ /// List of operations supported by the Azure Traffic Collector resource provider.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation[] Value { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.json.cs
new file mode 100644
index 000000000000..2feec3484b36
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/OperationListResult.json.cs
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ ///
+ /// Result of the request to list Azure Traffic Collector operations. It contains a list of operations and a URL link to get
+ /// the next set of results.
+ ///
+ public partial class OperationListResult
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new OperationListResult(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.Operation.FromJson(__u) )) ))() : null : Value;}
+ {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (null != this._value)
+ {
+ var __w = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.XNodeArray();
+ foreach( var __x in this._value )
+ {
+ AddIf(__x?.ToJson(null, serializationMode) ,__w.Add);
+ }
+ container.Add("value",__w);
+ }
+ AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.PowerShell.cs
new file mode 100644
index 000000000000..6b0148c89306
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.PowerShell.cs
@@ -0,0 +1,180 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// An azure resource object
+ [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))]
+ public partial class ProxyResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ProxyResource(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ProxyResource(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ProxyResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ProxyResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// An azure resource object
+ [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))]
+ public partial interface IProxyResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.TypeConverter.cs
new file mode 100644
index 000000000000..6065ed28efd1
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ProxyResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ProxyResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.cs
new file mode 100644
index 000000000000..6427fc230ba3
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.cs
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An azure resource object
+ public partial class ProxyResource :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Azure resource Id
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Azure resource name
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Azure resource type
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public ProxyResource()
+ {
+
+ }
+ }
+ /// An azure resource object
+ public partial interface IProxyResource :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Azure resource Id
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Azure resource Id",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// Azure resource name
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Azure resource name",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// Azure resource type
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Azure resource type",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// An azure resource object
+ internal partial interface IProxyResourceInternal
+
+ {
+ /// Azure resource Id
+ string Id { get; set; }
+ /// Azure resource name
+ string Name { get; set; }
+ /// Azure resource type
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.json.cs
new file mode 100644
index 000000000000..2e02ea4e64af
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ProxyResource.json.cs
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// An azure resource object
+ public partial class ProxyResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new ProxyResource(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.PowerShell.cs
new file mode 100644
index 000000000000..803fd522add5
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.PowerShell.cs
@@ -0,0 +1,164 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Resource reference properties.
+ [System.ComponentModel.TypeConverter(typeof(ResourceReferenceTypeConverter))]
+ public partial class ResourceReference
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new ResourceReference(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new ResourceReference(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal ResourceReference(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)this).Id, global::System.Convert.ToString);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal ResourceReference(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal)this).Id, global::System.Convert.ToString);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Resource reference properties.
+ [System.ComponentModel.TypeConverter(typeof(ResourceReferenceTypeConverter))]
+ public partial interface IResourceReference
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.TypeConverter.cs
new file mode 100644
index 000000000000..1704b4764e04
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class ResourceReferenceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return ResourceReference.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return ResourceReference.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return ResourceReference.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.cs
new file mode 100644
index 000000000000..258b58ffa978
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.cs
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Resource reference properties.
+ public partial class ResourceReference :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReferenceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Creates an new instance.
+ public ResourceReference()
+ {
+
+ }
+ }
+ /// Resource reference properties.
+ public partial interface IResourceReference :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+
+ }
+ /// Resource reference properties.
+ internal partial interface IResourceReferenceInternal
+
+ {
+ /// Resource ID.
+ string Id { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.json.cs
new file mode 100644
index 000000000000..e9483352e1e6
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/ResourceReference.json.cs
@@ -0,0 +1,111 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Resource reference properties.
+ public partial class ResourceReference
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.IResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new ResourceReference(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal ResourceReference(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.PowerShell.cs
new file mode 100644
index 000000000000..90614cf16a45
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.PowerShell.cs
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))]
+ public partial class SystemData
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new SystemData(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new SystemData(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal SystemData(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal SystemData(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))]
+ public partial interface ISystemData
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.TypeConverter.cs
new file mode 100644
index 000000000000..56d715b26fe4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return SystemData.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return SystemData.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.cs b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.cs
new file mode 100644
index 000000000000..21fd9e5443bd
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.cs
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class SystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal
+ {
+
+ /// Backing field for property.
+ private global::System.DateTime? _createdAt;
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; }
+
+ /// Backing field for property.
+ private string _createdBy;
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string CreatedBy { get => this._createdBy; set => this._createdBy = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? _createdByType;
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; }
+
+ /// Backing field for property.
+ private string _lastModifiedBy;
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? _lastModifiedByType;
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; }
+
+ /// Creates an new instance.
+ public SystemData()
+ {
+
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial interface ISystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource creation (UTC).",
+ SerializedName = @"createdAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? CreatedAt { get; set; }
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that created the resource.",
+ SerializedName = @"createdBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string CreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that created the resource.",
+ SerializedName = @"createdByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? CreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that last modified the resource.",
+ SerializedName = @"lastModifiedBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string LastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that last modified the resource.",
+ SerializedName = @"lastModifiedByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? LastModifiedByType { get; set; }
+
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ internal partial interface ISystemDataInternal
+
+ {
+ /// The timestamp of resource creation (UTC).
+ global::System.DateTime? CreatedAt { get; set; }
+ /// The identity that created the resource.
+ string CreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? CreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ string LastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? LastModifiedByType { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.json.cs
new file mode 100644
index 000000000000..bf26ef6f9455
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/SystemData.json.cs
@@ -0,0 +1,116 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class SystemData
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new SystemData(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;}
+ {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;}
+ {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;}
+ {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;}
+ {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add );
+ AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add );
+ AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add );
+ AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add );
+ AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.PowerShell.cs
new file mode 100644
index 000000000000..fbdee30d71c4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.PowerShell.cs
@@ -0,0 +1,164 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Tags object for patch operations.
+ [System.ComponentModel.TypeConverter(typeof(TagsObjectTypeConverter))]
+ public partial class TagsObject
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TagsObject(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TagsObject(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TagsObject(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTagsTypeConverter.ConvertFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TagsObject(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTagsTypeConverter.ConvertFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Tags object for patch operations.
+ [System.ComponentModel.TypeConverter(typeof(TagsObjectTypeConverter))]
+ public partial interface ITagsObject
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.TypeConverter.cs
new file mode 100644
index 000000000000..443323d05230
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.TypeConverter.cs
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TagsObjectTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TagsObject.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TagsObject.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TagsObject.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.cs
new file mode 100644
index 000000000000..472ff2831332
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.cs
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Tags object for patch operations.
+ public partial class TagsObject :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectInternal
+ {
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTags()); set => this._tag = value; }
+
+ /// Creates an new instance.
+ public TagsObject()
+ {
+
+ }
+ }
+ /// Tags object for patch operations.
+ public partial interface ITagsObject :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags Tag { get; set; }
+
+ }
+ /// Tags object for patch operations.
+ internal partial interface ITagsObjectInternal
+
+ {
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags Tag { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.json.cs
new file mode 100644
index 000000000000..c8c663116f32
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObject.json.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Tags object for patch operations.
+ public partial class TagsObject
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new TagsObject(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal TagsObject(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTags.FromJson(__jsonTags) : Tag;}
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.PowerShell.cs
new file mode 100644
index 000000000000..660b39d3e787
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.PowerShell.cs
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TagsObjectTagsTypeConverter))]
+ public partial class TagsObjectTags
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TagsObjectTags(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TagsObjectTags(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TagsObjectTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TagsObjectTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TagsObjectTagsTypeConverter))]
+ public partial interface ITagsObjectTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.TypeConverter.cs
new file mode 100644
index 000000000000..bfe913db3da0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TagsObjectTagsTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TagsObjectTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TagsObjectTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TagsObjectTags.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.cs
new file mode 100644
index 000000000000..3e1fb7663c06
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TagsObjectTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTagsInternal
+ {
+
+ /// Creates an new instance.
+ public TagsObjectTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface ITagsObjectTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface ITagsObjectTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.dictionary.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.dictionary.cs
new file mode 100644
index 000000000000..6ede85947235
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.dictionary.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ public partial class TagsObjectTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary();
+
+ global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; }
+
+ int Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; }
+
+ global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; }
+
+ public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; }
+
+ ///
+ ///
+ public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value);
+
+ public void Clear() => __additionalProperties.Clear();
+
+ ///
+ public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key);
+
+ ///
+ public void CopyFrom(global::System.Collections.IDictionary source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public void CopyFrom(global::System.Management.Automation.PSObject source)
+ {
+ if (null != source)
+ {
+ foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) )
+ {
+ if ((null != property.Key && null != property.Value))
+ {
+ this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value));
+ }
+ }
+ }
+ }
+
+ ///
+ public bool Remove(global::System.String key) => __additionalProperties.Remove( key);
+
+ ///
+ ///
+ public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value);
+
+ ///
+
+ public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TagsObjectTags source) => source.__additionalProperties;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.json.cs
new file mode 100644
index 000000000000..8ae22f02f471
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TagsObjectTags.json.cs
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TagsObjectTags
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITagsObjectTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new TagsObjectTags(json) : null;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ ///
+ internal TagsObjectTags(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions );
+ AfterFromJson(json);
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray)this).AdditionalProperties, container);
+ AfterToJson(ref container);
+ return container;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.PowerShell.cs
new file mode 100644
index 000000000000..ab8c736b6ac0
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.PowerShell.cs
@@ -0,0 +1,244 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Common resource representation.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))]
+ public partial class TrackedResource
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResource(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResource(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResource(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResource(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("SystemData"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemDataTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("Id"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Id, global::System.Convert.ToString);
+ }
+ if (content.Contains("Name"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Name, global::System.Convert.ToString);
+ }
+ if (content.Contains("Type"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Type, global::System.Convert.ToString);
+ }
+ if (content.Contains("Location"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Location, global::System.Convert.ToString);
+ }
+ if (content.Contains("Tag"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTagsTypeConverter.ConvertFrom);
+ }
+ if (content.Contains("SystemDataCreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataCreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("SystemDataCreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("SystemDataLastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("SystemDataLastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// Common resource representation.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))]
+ public partial interface ITrackedResource
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.TypeConverter.cs
new file mode 100644
index 000000000000..eb3e8e6c2ab2
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResource.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResource.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.cs
new file mode 100644
index 000000000000..b78e31ca375c
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.cs
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Common resource representation.
+ public partial class TrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal
+ {
+
+ /// Backing field for property.
+ private string _id;
+
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Id { get => this._id; }
+
+ /// Backing field for property.
+ private string _location;
+
+ /// Resource location.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Location { get => this._location; set => this._location = value; }
+
+ /// Internal Acessors for Id
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Id { get => this._id; set { {_id = value;} } }
+
+ /// Internal Acessors for Name
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Name { get => this._name; set { {_name = value;} } }
+
+ /// Internal Acessors for SystemData
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData()); set { {_systemData = value;} } }
+
+ /// Internal Acessors for Type
+ string Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceInternal.Type { get => this._type; set { {_type = value;} } }
+
+ /// Backing field for property.
+ private string _name;
+
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Name { get => this._name; }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData _systemData;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ internal Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData()); }
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inlined)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// Backing field for property.
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags _tag;
+
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTags()); set => this._tag = value; }
+
+ /// Backing field for property.
+ private string _type;
+
+ /// Resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Owned)]
+ public string Type { get => this._type; }
+
+ /// Creates an new instance.
+ public TrackedResource()
+ {
+
+ }
+ }
+ /// Common resource representation.
+ public partial interface ITrackedResource :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable
+ {
+ /// Resource ID.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource ID.",
+ SerializedName = @"id",
+ PossibleTypes = new [] { typeof(string) })]
+ string Id { get; }
+ /// Resource location.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource location.",
+ SerializedName = @"location",
+ PossibleTypes = new [] { typeof(string) })]
+ string Location { get; set; }
+ /// Resource name.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource name.",
+ SerializedName = @"name",
+ PossibleTypes = new [] { typeof(string) })]
+ string Name { get; }
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The timestamp of resource creation (UTC).",
+ SerializedName = @"createdAt",
+ PossibleTypes = new [] { typeof(global::System.DateTime) })]
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that created the resource.",
+ SerializedName = @"createdBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that created the resource.",
+ SerializedName = @"createdByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The identity that last modified the resource.",
+ SerializedName = @"lastModifiedBy",
+ PossibleTypes = new [] { typeof(string) })]
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"The type of identity that last modified the resource.",
+ SerializedName = @"lastModifiedByType",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+ /// Resource tags.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = false,
+ Description = @"Resource tags.",
+ SerializedName = @"tags",
+ PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags) })]
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags Tag { get; set; }
+ /// Resource type.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Info(
+ Required = false,
+ ReadOnly = true,
+ Description = @"Resource type.",
+ SerializedName = @"type",
+ PossibleTypes = new [] { typeof(string) })]
+ string Type { get; }
+
+ }
+ /// Common resource representation.
+ internal partial interface ITrackedResourceInternal
+
+ {
+ /// Resource ID.
+ string Id { get; set; }
+ /// Resource location.
+ string Location { get; set; }
+ /// Resource name.
+ string Name { get; set; }
+ /// Metadata pertaining to creation and last modification of the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData SystemData { get; set; }
+ /// The timestamp of resource creation (UTC).
+ global::System.DateTime? SystemDataCreatedAt { get; set; }
+ /// The identity that created the resource.
+ string SystemDataCreatedBy { get; set; }
+ /// The type of identity that created the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataCreatedByType { get; set; }
+ /// The identity that last modified the resource.
+ string SystemDataLastModifiedBy { get; set; }
+ /// The type of identity that last modified the resource.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? SystemDataLastModifiedByType { get; set; }
+ /// Resource tags.
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags Tag { get; set; }
+ /// Resource type.
+ string Type { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.json.cs
new file mode 100644
index 000000000000..590e1b1cf204
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResource.json.cs
@@ -0,0 +1,130 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Common resource representation.
+ public partial class TrackedResource
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new TrackedResource(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add );
+ }
+ if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeReadOnly))
+ {
+ AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add );
+ }
+ AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add );
+ AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add );
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData.FromJson(__jsonSystemData) : SystemData;}
+ {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;}
+ {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;}
+ {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;}
+ {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;}
+ {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.TrackedResourceTags.FromJson(__jsonTags) : Tag;}
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.PowerShell.cs
new file mode 100644
index 000000000000..7d302ce73480
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.PowerShell.cs
@@ -0,0 +1,198 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceSystemDataTypeConverter))]
+ public partial class TrackedResourceSystemData
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResourceSystemData(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResourceSystemData(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResourceSystemData(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResourceSystemData(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ if (content.Contains("CreatedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("CreatedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ if (content.Contains("CreatedAt"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified));
+ }
+ if (content.Contains("LastModifiedBy"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString);
+ }
+ if (content.Contains("LastModifiedByType"))
+ {
+ ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType.CreateFrom);
+ }
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceSystemDataTypeConverter))]
+ public partial interface ITrackedResourceSystemData
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.TypeConverter.cs
new file mode 100644
index 000000000000..3bf01f026fc4
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceSystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResourceSystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResourceSystemData.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResourceSystemData.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.cs
new file mode 100644
index 000000000000..e7728a40eaf3
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.cs
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class TrackedResourceSystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemDataInternal,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IValidates
+ {
+ ///
+ /// Backing field for Inherited model
+ ///
+ private Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData __systemData = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData();
+
+ /// The timestamp of resource creation (UTC).
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public global::System.DateTime? CreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedAt = value ?? default(global::System.DateTime); }
+
+ /// The identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string CreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedBy = value ?? null; }
+
+ /// The type of identity that created the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? CreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// The identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public string LastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedBy = value ?? null; }
+
+ /// The type of identity that last modified the resource.
+ [Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Origin(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.PropertyOrigin.Inherited)]
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType? LastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal)__systemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Support.CreatedByType)""); }
+
+ /// Creates an new instance.
+ public TrackedResourceSystemData()
+ {
+
+ }
+
+ /// Validates that this object meets the validation criteria.
+ /// an instance that will receive validation
+ /// events.
+ ///
+ /// A that will be complete when validation is completed.
+ ///
+ public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IEventListener eventListener)
+ {
+ await eventListener.AssertNotNull(nameof(__systemData), __systemData);
+ await eventListener.AssertObjectIsValid(nameof(__systemData), __systemData);
+ }
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial interface ITrackedResourceSystemData :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemData
+ {
+
+ }
+ /// Metadata pertaining to creation and last modification of the resource.
+ internal partial interface ITrackedResourceSystemDataInternal :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ISystemDataInternal
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.json.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.json.cs
new file mode 100644
index 000000000000..15eed08631f7
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceSystemData.json.cs
@@ -0,0 +1,108 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Metadata pertaining to creation and last modification of the resource.
+ public partial class TrackedResourceSystemData
+ {
+
+ ///
+ /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JsonNode that should be deserialized into this object.
+
+ partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json);
+
+ ///
+ /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The JSON container that the serialization result will be placed in.
+
+ partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container);
+
+ ///
+ /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of
+ /// the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the
+ /// output parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JsonNode that should be deserialized into this object.
+ /// Determines if the rest of the deserialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json, ref bool returnNow);
+
+ ///
+ /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the
+ /// object before it is serialized.
+ /// If you wish to disable the default serialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The JSON container that the serialization result will be placed in.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData.
+ ///
+ /// a to deserialize from.
+ ///
+ /// an instance of Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceSystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode node)
+ {
+ return node is Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json ? new TrackedResourceSystemData(json) : null;
+ }
+
+ ///
+ /// Serializes this instance of into a .
+ ///
+ /// The container to serialize this object into. If the caller
+ /// passes in null, a new instance will be created and returned to the caller.
+ /// Allows the caller to choose the depth of the serialization. See .
+ ///
+ /// a serialized instance of as a .
+ ///
+ public Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode serializationMode)
+ {
+ container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject();
+
+ bool returnNow = false;
+ BeforeToJson(ref container, ref returnNow);
+ if (returnNow)
+ {
+ return container;
+ }
+ __systemData?.ToJson(container, serializationMode);
+ AfterToJson(ref container);
+ return container;
+ }
+
+ ///
+ /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject into a new instance of .
+ ///
+ /// A Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject instance to deserialize from.
+ internal TrackedResourceSystemData(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonObject json)
+ {
+ bool returnNow = false;
+ BeforeFromJson(json, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ __systemData = new Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.SystemData(json);
+ AfterFromJson(json);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.PowerShell.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.PowerShell.cs
new file mode 100644
index 000000000000..d901ec0d19dd
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.PowerShell.cs
@@ -0,0 +1,162 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial class TrackedResourceTags
+ {
+
+ ///
+ /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the
+ /// object before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+
+ partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
+
+ ///
+ /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object
+ /// before it is returned. Implement this method in a partial class to enable this behavior
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+
+ partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
+
+ ///
+ /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
+
+ ///
+ /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization
+ /// of the object before it is deserialized.
+ /// If you wish to disable the default deserialization entirely, return true in the output
+ /// parameter.
+ /// Implement this method in a partial class to enable this behavior.
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ /// Determines if the rest of the serialization should be processed, or if the method should return
+ /// instantly.
+
+ partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
+
+ ///
+ /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior
+ ///
+ /// /// instance serialized to a string, normally it is a Json
+ /// /// set returnNow to true if you provide a customized OverrideToString function
+
+ partial void OverrideToString(ref string stringResult, ref bool returnNow);
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content)
+ {
+ return new TrackedResourceTags(content);
+ }
+
+ ///
+ /// Deserializes a into an instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ ///
+ /// an instance of .
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
+ {
+ return new TrackedResourceTags(content);
+ }
+
+ ///
+ /// Creates a new instance of , deserializing the content from a json string.
+ ///
+ /// a string containing a JSON serialized instance of this model.
+ /// an instance of the model class.
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(jsonText));
+
+ /// Serializes this instance to a json string.
+
+ /// a containing this model serialized to JSON text.
+ public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.SerializationMode.IncludeAll)?.ToString();
+
+ public override string ToString()
+ {
+ var returnNow = false;
+ var result = global::System.String.Empty;
+ OverrideToString(ref result, ref returnNow);
+ if (returnNow)
+ {
+ return result;
+ }
+ return ToJsonString();
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Collections.IDictionary content that should be used.
+ internal TrackedResourceTags(global::System.Collections.IDictionary content)
+ {
+ bool returnNow = false;
+ BeforeDeserializeDictionary(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializeDictionary(content);
+ }
+
+ ///
+ /// Deserializes a into a new instance of .
+ ///
+ /// The global::System.Management.Automation.PSObject content that should be used.
+ internal TrackedResourceTags(global::System.Management.Automation.PSObject content)
+ {
+ bool returnNow = false;
+ BeforeDeserializePSObject(content, ref returnNow);
+ if (returnNow)
+ {
+ return;
+ }
+ // actually deserialize
+ // this type is a dictionary; copy elements from source to here.
+ CopyFrom(content);
+ AfterDeserializePSObject(content);
+ }
+ }
+ /// Resource tags.
+ [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))]
+ public partial interface ITrackedResourceTags
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.TypeConverter.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.TypeConverter.cs
new file mode 100644
index 000000000000..a47e60cbfd08
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.TypeConverter.cs
@@ -0,0 +1,147 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.PowerShell;
+
+ ///
+ /// A PowerShell PSTypeConverter to support converting to an instance of
+ ///
+ public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter
+ {
+
+ ///
+ /// Determines if the converter can convert the parameter to the parameter.
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false.
+ ///
+ public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue);
+
+ ///
+ /// Determines if the converter can convert the parameter to the
+ /// type.
+ ///
+ /// the instance to check if it can be converted to the type.
+ ///
+ /// true if the instance could be converted to a type, otherwise false
+ ///
+ public static bool CanConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return true;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ // we say yest to PSObjects
+ return true;
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ // we say yest to Hashtables/dictionaries
+ return true;
+ }
+ try
+ {
+ if (null != sourceValue.ToJsonString())
+ {
+ return true;
+ }
+ }
+ catch
+ {
+ // Not one of our objects
+ }
+ try
+ {
+ string text = sourceValue.ToString()?.Trim();
+ return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Json.JsonType.Object;
+ }
+ catch
+ {
+ // Doesn't look like it can be treated as JSON
+ }
+ return false;
+ }
+
+ ///
+ /// Determines if the parameter can be converted to the
+ /// parameter
+ ///
+ /// the to convert from
+ /// the to convert to
+ ///
+ /// true if the converter can convert the parameter to the parameter, otherwise false
+ ///
+ public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false;
+
+ ///
+ /// Converts the parameter to the parameter using and
+ ///
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue);
+
+ ///
+ /// Converts the parameter into an instance of
+ ///
+ /// the value to convert into an instance of .
+ ///
+ /// an instance of , or null if there is no suitable conversion.
+ ///
+ public static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags ConvertFrom(dynamic sourceValue)
+ {
+ if (null == sourceValue)
+ {
+ return null;
+ }
+ global::System.Type type = sourceValue.GetType();
+ if (typeof(Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags).IsAssignableFrom(type))
+ {
+ return sourceValue;
+ }
+ try
+ {
+ return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());;
+ }
+ catch
+ {
+ // Unable to use JSON pattern
+ }
+ if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.DeserializeFromPSObject(sourceValue);
+ }
+ if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type))
+ {
+ return TrackedResourceTags.DeserializeFromDictionary(sourceValue);
+ }
+ return null;
+ }
+
+ /// NotImplemented -- this will return null
+ /// the to convert from
+ /// the to convert to
+ /// not used by this TypeConverter.
+ /// when set to true, will ignore the case when converting.
+ /// will always return null.
+ public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null;
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.cs
new file mode 100644
index 000000000000..416544ada2eb
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.cs
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ /// Resource tags.
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTags,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501.ITrackedResourceTagsInternal
+ {
+
+ /// Creates an new instance.
+ public TrackedResourceTags()
+ {
+
+ }
+ }
+ /// Resource tags.
+ public partial interface ITrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IJsonSerializable,
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray
+ {
+
+ }
+ /// Resource tags.
+ internal partial interface ITrackedResourceTagsInternal
+
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.dictionary.cs b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.dictionary.cs
new file mode 100644
index 000000000000..6bbf6740a749
--- /dev/null
+++ b/src/NetworkFunction/generated/api/Models/Api20220501/TrackedResourceTags.dictionary.cs
@@ -0,0 +1,75 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License. See License.txt in the project root for license information.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+// Changes may cause incorrect behavior and will be lost if the code is regenerated.
+
+namespace Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Models.Api20220501
+{
+ using static Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.Extensions;
+
+ public partial class TrackedResourceTags :
+ Microsoft.Azure.PowerShell.Cmdlets.NetworkFunction.Runtime.IAssociativeArray
+ {
+ protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary