diff --git a/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.format.ps1xml b/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.format.ps1xml index bd7407b82954..fe0c9494369a 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.format.ps1xml +++ b/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.format.ps1xml @@ -87,6 +87,98 @@ + + ADT.Models.ArchiveRuleset + + ADT.Models.ArchiveRuleset#Multiple + + + + + + + + + + + + + + + + + + + + + MaximumCompressionRatioLimit + + + MaximumDepthLimit + + + MaximumExpansionSizeLimit + + + MinimumSizeForExpansion + + + + + + + + ADT.Models.Authentication + + ADT.Models.Authentication#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + Audience + + + Authority + + + ClientIdOverride + + + IdentityTranslation + + + Instance + + + TenantId + + + + + + ADT.Models.Connection @@ -186,6 +278,9 @@ + + + @@ -232,6 +327,9 @@ + + ApiHostname + Approver @@ -301,6 +399,34 @@ + + ADT.Models.DataSizeRuleset + + ADT.Models.DataSizeRuleset#Multiple + + + + + + + + + + + + + + + Maximum + + + Minimum + + + + + + ADT.Models.DataTransferIdentity @@ -314,6 +440,9 @@ + + + @@ -333,6 +462,9 @@ FlowName + + FlowProfileName + PipelineName @@ -435,16 +567,238 @@ SystemDataCreatedByType - SystemDataLastModifiedAt + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + ADT.Models.FlowListResult + + ADT.Models.FlowListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + ADT.Models.FlowProfile + + ADT.Models.FlowProfile#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + ResourceGroupName + + + + + + + + ADT.Models.FlowProfileListResult + + ADT.Models.FlowProfileListResult#Multiple + + + + + + + + + + + + NextLink + + + + + + + + ADT.Models.FlowProfileMetadata + + ADT.Models.FlowProfileMetadata#Multiple + + + + + + + + + + + + + + + + + + + + + + + + + + + Description + + + FlowProfileId + + + Name + + + Pipeline + + + ReplicationScenario + + + Status + + + + + + + + ADT.Models.FlowProfilePatchProperties + + ADT.Models.FlowProfilePatchProperties#Multiple + + + + + + + + + + + + + + + + + + Description - SystemDataLastModifiedBy + ProvisioningState - SystemDataLastModifiedByType + Status + + + + + + + ADT.Models.FlowProfilePatchTags + + ADT.Models.FlowProfilePatchTags#Multiple + + + + + + + + + + - ResourceGroupName + Item @@ -452,21 +806,45 @@ - ADT.Models.FlowListResult + ADT.Models.FlowProfileProperties - ADT.Models.FlowListResult#Multiple + ADT.Models.FlowProfileProperties#Multiple - + + + + + + + + + + + + + - NextLink + Description + + + FlowProfileId + + + ProvisioningState + + + ReplicationScenario + + + Status @@ -492,6 +870,9 @@ + + + @@ -556,6 +937,9 @@ EventHubId + + FlowDataType + FlowId @@ -653,6 +1037,28 @@ + + ADT.Models.InternalMetadataProperties + + ADT.Models.InternalMetadataProperties#Multiple + + + + + + + + + + + + StatusSetBy + + + + + + ADT.Models.ListApprovedSchemasRequest @@ -681,6 +1087,28 @@ + + ADT.Models.ListFlowProfilesRequest + + ADT.Models.ListFlowProfilesRequest#Multiple + + + + + + + + + + + + Pipeline + + + + + + ADT.Models.ManagedServiceIdentity @@ -719,6 +1147,9 @@ + + + @@ -726,6 +1157,59 @@ BillingTier + + PerformancePriority + + + + + + + + ADT.Models.MimeTypeFilter + + ADT.Models.MimeTypeFilter#Multiple + + + + + + + + + + + + Media + + + + + + + + ADT.Models.OperationStatusProperties + + ADT.Models.OperationStatusProperties#Multiple + + + + + + + + + + + + + + + Message + + + Status + @@ -738,6 +1222,9 @@ + + + @@ -793,6 +1280,9 @@ + + ApiHostname + Approver @@ -915,6 +1405,9 @@ + + + @@ -991,6 +1484,9 @@ EventHubId + + FlowDataType + FlowId @@ -1310,49 +1806,33 @@ - ADT.Models.ReadInternalMetadataProperties + ADT.Models.ReadPipelineConnection - ADT.Models.ReadInternalMetadataProperties#Multiple + ADT.Models.ReadPipelineConnection#Multiple - + - - - - - - StatusSetBy - - - - - - - - ADT.Models.ReadOperationStatusProperties - - ADT.Models.ReadOperationStatusProperties#Multiple - - - - + - + - Message + Etag - Status + Location + + + Name @@ -1360,33 +1840,21 @@ - ADT.Models.ReadPipelineConnection + ADT.Models.RemoteEndpointSettings - ADT.Models.ReadPipelineConnection#Multiple + ADT.Models.RemoteEndpointSettings#Multiple - - - - - - - + - Etag - - - Location - - - Name + Endpoint @@ -1625,6 +2093,40 @@ + + ADT.Models.TextMatch + + ADT.Models.TextMatch#Multiple + + + + + + + + + + + + + + + + + + CaseSensitivity + + + MatchType + + + Text + + + + + + ADT.Models.TrackedResource @@ -1767,5 +2269,39 @@ + + ADT.Models.XmlFilterRuleset + + ADT.Models.XmlFilterRuleset#Multiple + + + + + + + + + + + + + + + + + + DefaultNamespace + + + Reference + + + Schema + + + + + + \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.psd1 b/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.psd1 index 4216d9b0a27f..36debaf893e0 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.psd1 +++ b/generated/DataTransfer/DataTransfer.Autorest/Az.DataTransfer.psd1 @@ -11,7 +11,7 @@ DotNetFrameworkVersion = '4.7.2' RequiredAssemblies = './bin/Az.DataTransfer.private.dll' FormatsToProcess = './Az.DataTransfer.format.ps1xml' - FunctionsToExport = 'Approve-AzDataTransferConnection', 'Deny-AzDataTransferConnection', 'Disable-AzDataTransferConnection', 'Disable-AzDataTransferFlow', 'Disable-AzDataTransferFlowType', 'Disable-AzDataTransferPipeline', 'Enable-AzDataTransferConnection', 'Enable-AzDataTransferFlow', 'Enable-AzDataTransferFlowType', 'Enable-AzDataTransferPipeline', 'Get-AzDataTransferConnection', 'Get-AzDataTransferFlow', 'Get-AzDataTransferPendingConnection', 'Get-AzDataTransferPendingFlow', 'Get-AzDataTransferPipeline', 'Invoke-AzDataTransferLinkPendingConnection', 'Invoke-AzDataTransferLinkPendingFlow', 'New-AzDataTransferConnection', 'New-AzDataTransferFlow', 'Remove-AzDataTransferConnection', 'Remove-AzDataTransferFlow', 'Update-AzDataTransferConnection', 'Update-AzDataTransferFlow' + FunctionsToExport = 'Approve-AzDataTransferConnection', 'Deny-AzDataTransferConnection', 'Disable-AzDataTransferConnection', 'Disable-AzDataTransferFlow', 'Disable-AzDataTransferFlowType', 'Disable-AzDataTransferPipeline', 'Enable-AzDataTransferConnection', 'Enable-AzDataTransferFlow', 'Enable-AzDataTransferFlowType', 'Enable-AzDataTransferPipeline', 'Get-AzDataTransferConnection', 'Get-AzDataTransferFlow', 'Get-AzDataTransferFlowProfile', 'Get-AzDataTransferPendingConnection', 'Get-AzDataTransferPendingFlow', 'Get-AzDataTransferPipeline', 'Invoke-AzDataTransferLinkPendingConnection', 'Invoke-AzDataTransferLinkPendingFlow', 'New-AzDataTransferConnection', 'New-AzDataTransferFlow', 'New-AzDataTransferFlowProfile', 'Remove-AzDataTransferConnection', 'Remove-AzDataTransferFlow', 'Update-AzDataTransferConnection', 'Update-AzDataTransferFlow', 'Update-AzDataTransferFlowProfile' PrivateData = @{ PSData = @{ Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'DataTransfer' diff --git a/generated/DataTransfer/DataTransfer.Autorest/Properties/AssemblyInfo.cs b/generated/DataTransfer/DataTransfer.Autorest/Properties/AssemblyInfo.cs index f5613433c8e9..d4a6cb587ded 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/Properties/AssemblyInfo.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - DataTransfer")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0")] -[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] [assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Approve-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Approve-AzDataTransferConnection.ps1 index 444303020e7d..c1c9ef9d20cd 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Approve-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Approve-AzDataTransferConnection.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Approves the specified connection request in a pipeline. +Approves a pending connection request associated with the specified Pipeline. .Description -Approves the specified connection request in a pipeline. +Approves a pending connection request associated with the specified Pipeline. .Example $connectionToApprove = Get-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 Approve-AzDataTransferConnection -PipelineName Pipeline01 -ResourceGroupName ResourceGroup01 -ConnectionId $connectionToApprove.Id -StatusReason "Approved for processing" -Confirm:$false @@ -41,8 +41,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -58,7 +59,7 @@ param( [Parameter(ParameterSetName='ApproveViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Approve', Mandatory)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Deny-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Deny-AzDataTransferConnection.ps1 index 098e042bddaa..aee8d352b9bd 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Deny-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Deny-AzDataTransferConnection.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Rejects the specified connection request in a pipeline. +Rejects a pending connection request associated with the specified Pipeline. .Description -Rejects the specified connection request in a pipeline. +Rejects a pending connection request associated with the specified Pipeline. .Example $connectionToDeny = Get-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 Deny-AzDataTransferConnection -PipelineName Pipeline01 -ResourceGroupName ResourceGroup01 -ConnectionId $connectionToDeny.Id -StatusReason "Not Authorized for processing" -Confirm:$false @@ -41,8 +41,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -58,7 +59,7 @@ param( [Parameter(ParameterSetName='RejectViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Reject', Mandatory)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Disable-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Disable-AzDataTransferFlow.ps1 index b91a790b1541..aa36c4db9e44 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Disable-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Disable-AzDataTransferFlow.ps1 @@ -34,16 +34,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Enable-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Enable-AzDataTransferFlow.ps1 index afc090e87a30..a3213fc42d46 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Enable-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Enable-AzDataTransferFlow.ps1 @@ -34,16 +34,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferConnection.ps1 index 8fd678618827..e40147424465 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferConnection.ps1 @@ -38,8 +38,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlow.ps1 index aceb49b111cc..f8336120a724 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlow.ps1 @@ -36,16 +36,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlowProfile.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlowProfile.ps1 new file mode 100644 index 000000000000..6a03d3a56071 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferFlowProfile.ps1 @@ -0,0 +1,282 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Retrieves the specified FlowProfile resource. +.Description +Retrieves the specified FlowProfile resource. +.Example +Get-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +.Example +Get-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "api-flowprofile" + +.Inputs +ADT.Models.IDataTransferIdentity +.Inputs +ADT.Models.IListFlowProfilesRequest +.Outputs +ADT.Models.IFlowProfile +.Outputs +ADT.Models.IFlowProfileMetadata +.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. + +BODY : Defines the required request body for retrieving FlowProfile information for a provided pipeline. + [Pipeline ]: The name of the pipeline for which to retrieve associated FlowProfiles. + +INPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/get-azdatatransferflowprofile +#> +function Get-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile], [ADT.Models.IFlowProfileMetadata])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPipeline', Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='ListExpanded')] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPipeline', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] + [ADT.Category('Body')] + [ADT.Models.IListFlowProfilesRequest] + # Defines the required request body for retrieving FlowProfile information for a provided pipeline. + ${Body}, + + [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the List operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ListViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the List operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\Get-AzDataTransferFlowProfile_Get'; + GetViaIdentity = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_GetViaIdentity'; + GetViaIdentityPipeline = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_GetViaIdentityPipeline'; + List = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_List'; + List1 = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_List1'; + ListExpanded = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListExpanded'; + ListViaJsonFilePath = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListViaJsonFilePath'; + ListViaJsonString = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListViaJsonString'; + } + if (('Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferPipeline.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferPipeline.ps1 index f881f869440c..25d2bca54907 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferPipeline.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Get-AzDataTransferPipeline.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Gets pipeline resource. +Retrieves the specified Pipeline resource. .Description -Gets pipeline resource. +Retrieves the specified Pipeline resource. .Example $pipeline01 = Get-AzDataTransferPipeline -ResourceGroupName ResourceGroup01 -Name Pipeline01 .Example @@ -38,8 +38,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -53,7 +54,7 @@ param( [Alias('PipelineName')] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingConnection.ps1 index 95087fef1a76..249fe2fe076d 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingConnection.ps1 @@ -41,8 +41,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingFlow.ps1 index f3358a5936ae..b1f64f75bff3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Invoke-AzDataTransferLinkPendingFlow.ps1 @@ -37,8 +37,9 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. @@ -49,8 +50,9 @@ FLOW : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferConnection.ps1 index ba05fb29b289..84df9a12f469 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferConnection.ps1 @@ -26,6 +26,28 @@ data processing" -RemoteSubscriptionId 11111111-1111-1111-1111-111111111111 -Con New-AzDataTransferConnection -ResourceGroupName ResourceGroup02 -PipelineName Pipeline01 -Name Connection02 -Location "WestUS" -Direction "Send" -PIN "ABCDEFG" -FlowType "Mission" -Justification "Required for data processing" -Confirm:$false .Example New-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection03 -PipelineName Pipeline01 -Location "EastUS" -Direction "Receive" -FlowType "Mission" -RequirementId 123 -Justification "Required for data export" -PrimaryContact "user@example.com" -SecondaryContact "admin@example.com" -Tag @{Environment="Production"} -Confirm:$false +.Example +# First, create or reference existing FlowProfiles +$basicFlowProfile = @{ + Name = "files-flowprofile" + Pipeline = "Pipeline01" + FlowProfileId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.AzureDataTransfer/pipelines/Pipeline01/flowProfiles/files-flowprofile" + ReplicationScenario = "Files" + Status = "Enabled" + Description = "Basic FlowProfile for file transfers" +} + +$messagingFlowProfile = @{ + Name = "messaging-flowprofile" + Pipeline = "Pipeline01" + FlowProfileId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.AzureDataTransfer/pipelines/Pipeline01/flowProfiles/messaging-flowprofile" + ReplicationScenario = "Messaging" + Status = "Enabled" + Description = "Messaging FlowProfile with antivirus protection" +} + +# Create connection with FlowProfiles +New-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -PipelineName Pipeline01 -Name Connection04 -Location "EastUS" -Direction "Receive" -FlowProfileList @($basicFlowProfile, $messagingFlowProfile) -RequirementId "FP-2025-001" -Justification "Modern connection using FlowProfile architecture for enhanced security and flexibility" -RemoteSubscriptionId "11111111-1111-1111-1111-111111111111" -PrimaryContact "dataowner@company.com" -SecondaryContact @("security@company.com", "operations@company.com") -Tag @{Environment="Production"; DataClassification="Sensitive"} -Confirm:$false .Outputs ADT.Models.IConnection @@ -34,7 +56,15 @@ 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. -SCHEMA : The schemas for this connection +FLOWPROFILELIST : Provides a list of FlowProfiles . + Description : A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied. + FlowProfileId : A guid represented as a string for the FlowProfile resource, assigned by the system. + Name : The name of the FlowProfile. + Pipeline : The name of the parent Pipeline Azure resource associated with this FlowProfile. + ReplicationScenario : The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties. + Status : The operational status of the FlowProfile. + +SCHEMA : The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead. [ConnectionId ]: Connection ID associated with this schema [Content ]: Content of the schema [Direction ]: The direction of the schema. @@ -78,6 +108,12 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # Hostname specific to API Flows + ${ApiHostname}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.PSArgumentCompleterAttribute("Send", "Receive")] [ADT.Category('Body')] @@ -85,12 +121,21 @@ param( # Direction of data movement ${Direction}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IFlowProfileMetadata[]] + # Provides a list of FlowProfiles . + ${FlowProfileList}, + [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] [ADT.Category('Body')] [System.String[]] - # The flow types being requested for this connection + # The flow types being requested for this connection. + # This FlowType property has reached end of life support starting version 2025-05-30-preview. + # Please create a FlowProfile resource instead. ${FlowType}, [Parameter(ParameterSetName='CreateExpanded')] @@ -140,14 +185,18 @@ param( [AllowEmptyCollection()] [ADT.Category('Body')] [ADT.Models.ISchema[]] - # The schemas for this connection + # The schemas for this connection. + # The schemas property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${Schema}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [ADT.Category('Body')] [System.String[]] - # The schema URIs for this connection + # The schema URIs for this connection. + # The schemaUris property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${SchemaUri}, [Parameter(ParameterSetName='CreateExpanded')] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlow.ps1 index ac7c040371db..c083f2c1afef 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlow.ps1 @@ -23,9 +23,35 @@ Create the flow resource. New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Confirm:$false .Example New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Status Enabled -Tag @{Environment="Production"} -Confirm:$false +.Example +New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName BasicReceiveConnection01 -Name BasicRecvBlobFiles01 -Location "CentralUS" -Status "Enabled" -FlowDataType "Blob" -FlowProfilePipeline "Pipeline01" -FlowProfileName "BasicFlowProfile01" -FlowProfileReplicationScenario "Files" -FlowProfileStatus "Enabled" -FlowProfileId "000000000000-0000-0000-00000000" -FlowProfileDescription "Basic flow profile for file replication" -Confirm:$false .Outputs ADT.Models.IFlow +.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. + +APIFLOWOPTIONAUTHENTICATION : Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + [ApplicationId >]: List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + [Audience ]: Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a value is not provided. + [Authority ]: The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication context. + [ClientIdOverride ]: The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. This field specifies the user provided app's clientId. + [IdentityTranslation ]: Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + [Instance ]: The identity provider's token service instance. + [TenantId ]: A unique identifier representing the tenant of the identity provider's token service. + [Type ]: Type of authentication mechanism. JWT by default. + +REMOTEENDPOINTSETTINGAUTHENTICATION : Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + [ApplicationId >]: List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + [Audience ]: Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a value is not provided. + [Authority ]: The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication context. + [ClientIdOverride ]: The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. This field specifies the user provided app's clientId. + [IdentityTranslation ]: Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + [Instance ]: The identity provider's token service instance. + [TenantId ]: A unique identifier representing the tenant of the identity provider's token service. + [Type ]: Type of authentication mechanism. JWT by default. .Link https://learn.microsoft.com/powershell/module/az.datatransfer/new-azdatatransferflow #> @@ -77,9 +103,20 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Optional field to override the audience of the remote endpoint + # Optional field to override the audience of the remote endpoint. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionAudienceOverride}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IAuthentication[]] + # Optional and for advanced used only. + # A list of authentication methods to use when accessing the Azure Data Transfer API Flow. + # If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + ${ApiFlowOptionAuthentication}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] @@ -90,25 +127,33 @@ param( [ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] [ADT.Category('Body')] [System.String] - # Flag for if Azure Data Transfer API Flow should extract the user token + # Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionIdentityTranslation}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Remote stub app registration Client ID + # Remote stub app registration Client ID. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionRemoteCallingModeClientId}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Remote host to which communication needs to be made + # Remote host to which communication needs to be made. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the remoteEndpointSettings.endpoint property instead. ${ApiFlowOptionRemoteEndpoint}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Sender's app user assigned Manage Identity client ID + # Sender's app user assigned Manage Identity client ID. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionSenderClientId}, [Parameter(ParameterSetName='CreateExpanded')] @@ -146,6 +191,8 @@ param( [ADT.Category('Body')] [System.String] # Type of data to transfer via the flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${DataType}, [Parameter(ParameterSetName='CreateExpanded')] @@ -168,11 +215,61 @@ param( # Event Hub ID ${EventHubId}, + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + [ADT.Category('Body')] + [System.String] + # The Flow's data class. + ${FlowDataType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A description of the FlowProfile and its rulesets. + # The description should describe the flowprofile's purpose and rulesets applied. + ${FlowProfileDescription}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A guid represented as a string for the FlowProfile resource, assigned by the system. + ${FlowProfileId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The name of the FlowProfile. + ${FlowProfileName}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The name of the parent Pipeline Azure resource associated with this FlowProfile. + ${FlowProfilePipeline}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + [ADT.Category('Body')] + [System.String] + # The data replication scenario handled by this FlowProfile. + # Please note, that this value cannot be updated after creation. + # See the FlowProfilePatchProperties to see updateable properties. + ${FlowProfileReplicationScenario}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + [ADT.Category('Body')] + [System.String] + # The operational status of the FlowProfile. + ${FlowProfileStatus}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] [ADT.Category('Body')] [System.String] - # The flow type for this flow + # The flow type for this flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${FlowType}, [Parameter(ParameterSetName='CreateExpanded')] @@ -189,6 +286,15 @@ param( # Billing tier for this messaging flow ${MessagingOptionBillingTier}, + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [ADT.Category('Body')] + [System.String] + # Field indicating whether to enable guaranteed delivery on the flow or not. + # The default disabled option chooses speed over consistency. + # When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + ${MessagingOptionPerformancePriority}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] @@ -236,6 +342,21 @@ param( # Name of the connection ${PropertiesConnectionName}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IAuthentication[]] + # Optional and for advanced used only. + # A list of authentication methods to use when accessing the remote endpoint. + # If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + ${RemoteEndpointSettingAuthentication}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The remote endpoint uri all API calls. + ${RemoteEndpointSettingEndpoint}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlowProfile.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlowProfile.ps1 new file mode 100644 index 000000000000..cb34ac6f7446 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/New-AzDataTransferFlowProfile.ps1 @@ -0,0 +1,402 @@ + +# ---------------------------------------------------------------------------------- +# 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 a new FlowProfile or create an existing one. +.Description +Create a new FlowProfile or create an existing one. +.Example +New-AzDataTransferFlowProfile -Name "files-flowprofile" -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Location "EastUS" -ReplicationScenario "Files" -Status "Enabled" -Description "Basic FlowProfile for standard file transfers" +.Example +New-AzDataTransferFlowProfile -Name "messaging-flowprofile" -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Location "EastUS" -ReplicationScenario "Messaging" -Status "Enabled" -Description "Messaging FlowProfile with antivirus scanning" -AntivirusAvSolution @("Defender") + +.Outputs +ADT.Models.IFlowProfile +.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. + +MIMEFILTER : Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model. + [Extension >]: A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, use an empty string ""." + [Media ]: The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + +TEXTMATCHINGDENY : A list of text patterns to block, each with matching rules and case sensitivity options. + CaseSensitivity : Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + MatchType : Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + Text : The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/new-azdatatransferflowprofile +#> +function New-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [ADT.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + [ADT.Category('Body')] + [System.String[]] + # Optional. + # The list of antiviruses to be used as a scanning solution for replicating data. + ${AntivirusAvSolution}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Double] + # Optional. + # Provides the multiplication value for an archive in total based on the initial object being validated. + # This value takes the root object size and multiplies it by this value to create a maximum. + # Once this maximum is exceeded, the archive is failed. + # Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + ${ArchiveMaximumCompressionRatioLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The maximum depth of nested archives that can be expanded. + # Limits how many layers of embedded archives will be processed. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumDepthLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumExpansionSizeLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # The minimum archive file size (in bytes) required to trigger expansion during replication. + # Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + ${ArchiveMinimumSizeForExpansion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Specifies the maximum allowed size (in bytes) for files to be replicated. + # Any file size greater than maximum will be denied replication. + ${DataSizeMaximum}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # Specifies the minimum required size (in bytes) for a file to be eligible for replication. + # Any file size less than minimum will be denied replication. + ${DataSizeMinimum}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A user-defined description of the FlowProfile. + ${Description}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [ADT.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IMimeTypeFilter[]] + # Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. + # For more detail, please refer to the MimeTypeFiler model. + ${MimeFilter}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + [ADT.Category('Body')] + [System.String] + # Specifies whether the filter is an allow list or deny list. + # For more detail, please refer to the FilterType model. + ${MimeFilterType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + [ADT.Category('Body')] + [System.String] + # The data replication scenario handled by this FlowProfile. + # Please not, that this value cannot be updated after creation. + ${ReplicationScenario}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + [ADT.Category('Body')] + [System.String] + # The operational status of the FlowProfile. + ${Status}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.ITextMatch[]] + # A list of text patterns to block, each with matching rules and case sensitivity options. + ${TextMatchingDeny}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IUserAssignedIdentities]))] + [System.Collections.Hashtable] + # The set of user assigned identities associated with the resource. + # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + # The dictionary values can be empty objects ({}) in requests. + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The default XML namespace used for schema validation. + ${XmlFilterDefaultNamespace}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Inline")] + [ADT.Category('Body')] + [System.String] + # Defines the method for referencing the xml schema. + ${XmlFilterReference}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The inline XSD schema to be used for validation. + ${XmlFilterSchema}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\New-AzDataTransferFlowProfile_CreateExpanded'; + CreateViaJsonFilePath = 'Az.DataTransfer.private\New-AzDataTransferFlowProfile_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.DataTransfer.private\New-AzDataTransferFlowProfile_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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/generated/DataTransfer/DataTransfer.Autorest/exports/ProxyCmdletDefinitions.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/ProxyCmdletDefinitions.ps1 index 8f5f451c588c..14e3e49dceb1 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Approves the specified connection request in a pipeline. +Approves a pending connection request associated with the specified Pipeline. .Description -Approves the specified connection request in a pipeline. +Approves a pending connection request associated with the specified Pipeline. .Example $connectionToApprove = Get-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 Approve-AzDataTransferConnection -PipelineName Pipeline01 -ResourceGroupName ResourceGroup01 -ConnectionId $connectionToApprove.Id -StatusReason "Approved for processing" -Confirm:$false @@ -41,8 +41,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -58,7 +59,7 @@ param( [Parameter(ParameterSetName='ApproveViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Approve', Mandatory)] @@ -287,9 +288,9 @@ end { <# .Synopsis -Rejects the specified connection request in a pipeline. +Rejects a pending connection request associated with the specified Pipeline. .Description -Rejects the specified connection request in a pipeline. +Rejects a pending connection request associated with the specified Pipeline. .Example $connectionToDeny = Get-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 Deny-AzDataTransferConnection -PipelineName Pipeline01 -ResourceGroupName ResourceGroup01 -ConnectionId $connectionToDeny.Id -StatusReason "Not Authorized for processing" -Confirm:$false @@ -312,8 +313,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -329,7 +331,7 @@ param( [Parameter(ParameterSetName='RejectViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Reject', Mandatory)] @@ -576,16 +578,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -816,16 +820,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -1060,8 +1066,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -1251,6 +1258,273 @@ end { } } +<# +.Synopsis +Retrieves the specified FlowProfile resource. +.Description +Retrieves the specified FlowProfile resource. +.Example +Get-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" +.Example +Get-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "api-flowprofile" + +.Inputs +ADT.Models.IDataTransferIdentity +.Inputs +ADT.Models.IListFlowProfilesRequest +.Outputs +ADT.Models.IFlowProfile +.Outputs +ADT.Models.IFlowProfileMetadata +.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. + +BODY : Defines the required request body for retrieving FlowProfile information for a provided pipeline. + [Pipeline ]: The name of the pipeline for which to retrieve associated FlowProfiles. + +INPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/get-azdatatransferflowprofile +#> +function Get-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile], [ADT.Models.IFlowProfileMetadata])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='GetViaIdentityPipeline', Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Parameter(ParameterSetName='ListExpanded')] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List1')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='GetViaIdentityPipeline', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] + [ADT.Category('Body')] + [ADT.Models.IListFlowProfilesRequest] + # Defines the required request body for retrieving FlowProfile information for a provided pipeline. + ${Body}, + + [Parameter(ParameterSetName='ListViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the List operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='ListViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the List operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\Get-AzDataTransferFlowProfile_Get'; + GetViaIdentity = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_GetViaIdentity'; + GetViaIdentityPipeline = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_GetViaIdentityPipeline'; + List = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_List'; + List1 = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_List1'; + ListExpanded = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListExpanded'; + ListViaJsonFilePath = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListViaJsonFilePath'; + ListViaJsonString = 'Az.DataTransfer.private\Get-AzDataTransferFlowProfile_ListViaJsonString'; + } + if (('Get', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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 flow resource. @@ -1273,16 +1547,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -1856,9 +2132,9 @@ end { <# .Synopsis -Gets pipeline resource. +Retrieves the specified Pipeline resource. .Description -Gets pipeline resource. +Retrieves the specified Pipeline resource. .Example $pipeline01 = Get-AzDataTransferPipeline -ResourceGroupName ResourceGroup01 -Name Pipeline01 .Example @@ -1878,8 +2154,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -1893,7 +2170,7 @@ param( [Alias('PipelineName')] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${Name}, [Parameter(ParameterSetName='Get', Mandatory)] @@ -2096,8 +2373,9 @@ CONNECTION : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -2363,8 +2641,9 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. @@ -2375,8 +2654,9 @@ FLOW : The resource to reference. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -2654,6 +2934,28 @@ data processing" -RemoteSubscriptionId 11111111-1111-1111-1111-111111111111 -Con New-AzDataTransferConnection -ResourceGroupName ResourceGroup02 -PipelineName Pipeline01 -Name Connection02 -Location "WestUS" -Direction "Send" -PIN "ABCDEFG" -FlowType "Mission" -Justification "Required for data processing" -Confirm:$false .Example New-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection03 -PipelineName Pipeline01 -Location "EastUS" -Direction "Receive" -FlowType "Mission" -RequirementId 123 -Justification "Required for data export" -PrimaryContact "user@example.com" -SecondaryContact "admin@example.com" -Tag @{Environment="Production"} -Confirm:$false +.Example +# First, create or reference existing FlowProfiles +$basicFlowProfile = @{ + Name = "files-flowprofile" + Pipeline = "Pipeline01" + FlowProfileId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.AzureDataTransfer/pipelines/Pipeline01/flowProfiles/files-flowprofile" + ReplicationScenario = "Files" + Status = "Enabled" + Description = "Basic FlowProfile for file transfers" +} + +$messagingFlowProfile = @{ + Name = "messaging-flowprofile" + Pipeline = "Pipeline01" + FlowProfileId = "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.AzureDataTransfer/pipelines/Pipeline01/flowProfiles/messaging-flowprofile" + ReplicationScenario = "Messaging" + Status = "Enabled" + Description = "Messaging FlowProfile with antivirus protection" +} + +# Create connection with FlowProfiles +New-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -PipelineName Pipeline01 -Name Connection04 -Location "EastUS" -Direction "Receive" -FlowProfileList @($basicFlowProfile, $messagingFlowProfile) -RequirementId "FP-2025-001" -Justification "Modern connection using FlowProfile architecture for enhanced security and flexibility" -RemoteSubscriptionId "11111111-1111-1111-1111-111111111111" -PrimaryContact "dataowner@company.com" -SecondaryContact @("security@company.com", "operations@company.com") -Tag @{Environment="Production"; DataClassification="Sensitive"} -Confirm:$false .Outputs ADT.Models.IConnection @@ -2662,7 +2964,15 @@ 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. -SCHEMA : The schemas for this connection +FLOWPROFILELIST : Provides a list of FlowProfiles . + Description : A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied. + FlowProfileId : A guid represented as a string for the FlowProfile resource, assigned by the system. + Name : The name of the FlowProfile. + Pipeline : The name of the parent Pipeline Azure resource associated with this FlowProfile. + ReplicationScenario : The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties. + Status : The operational status of the FlowProfile. + +SCHEMA : The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead. [ConnectionId ]: Connection ID associated with this schema [Content ]: Content of the schema [Direction ]: The direction of the schema. @@ -2706,6 +3016,12 @@ param( # The geo-location where the resource lives ${Location}, + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # Hostname specific to API Flows + ${ApiHostname}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.PSArgumentCompleterAttribute("Send", "Receive")] [ADT.Category('Body')] @@ -2713,12 +3029,21 @@ param( # Direction of data movement ${Direction}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IFlowProfileMetadata[]] + # Provides a list of FlowProfiles . + ${FlowProfileList}, + [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] [ADT.Category('Body')] [System.String[]] - # The flow types being requested for this connection + # The flow types being requested for this connection. + # This FlowType property has reached end of life support starting version 2025-05-30-preview. + # Please create a FlowProfile resource instead. ${FlowType}, [Parameter(ParameterSetName='CreateExpanded')] @@ -2768,14 +3093,18 @@ param( [AllowEmptyCollection()] [ADT.Category('Body')] [ADT.Models.ISchema[]] - # The schemas for this connection + # The schemas for this connection. + # The schemas property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${Schema}, [Parameter(ParameterSetName='CreateExpanded')] [AllowEmptyCollection()] [ADT.Category('Body')] [System.String[]] - # The schema URIs for this connection + # The schema URIs for this connection. + # The schemaUris property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${SchemaUri}, [Parameter(ParameterSetName='CreateExpanded')] @@ -2975,34 +3304,447 @@ end { <# .Synopsis -Create the flow resource. +Create a new FlowProfile or create an existing one. .Description -Create the flow resource. +Create a new FlowProfile or create an existing one. .Example -New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Confirm:$false +New-AzDataTransferFlowProfile -Name "files-flowprofile" -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Location "EastUS" -ReplicationScenario "Files" -Status "Enabled" -Description "Basic FlowProfile for standard file transfers" .Example -New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Status Enabled -Tag @{Environment="Production"} -Confirm:$false +New-AzDataTransferFlowProfile -Name "messaging-flowprofile" -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -Location "EastUS" -ReplicationScenario "Messaging" -Status "Enabled" -Description "Messaging FlowProfile with antivirus scanning" -AntivirusAvSolution @("Defender") .Outputs -ADT.Models.IFlow +ADT.Models.IFlowProfile +.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. + +MIMEFILTER : Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model. + [Extension >]: A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, use an empty string ""." + [Media ]: The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + +TEXTMATCHINGDENY : A list of text patterns to block, each with matching rules and case sensitivity options. + CaseSensitivity : Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + MatchType : Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + Text : The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. .Link -https://learn.microsoft.com/powershell/module/az.datatransfer/new-azdatatransferflow +https://learn.microsoft.com/powershell/module/az.datatransfer/new-azdatatransferflowprofile #> -function New-AzDataTransferFlow { -[OutputType([ADT.Models.IFlow])] +function New-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile])] [CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(Mandatory)] + [Alias('FlowProfileName')] [ADT.Category('Path')] [System.String] - # The name for the connection to perform the operation on. - ${ConnectionName}, + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, [Parameter(Mandatory)] - [Alias('FlowName')] [ADT.Category('Path')] [System.String] - # The name for the flow to perform the operation on. + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='CreateExpanded', Mandatory)] + [ADT.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + [ADT.Category('Body')] + [System.String[]] + # Optional. + # The list of antiviruses to be used as a scanning solution for replicating data. + ${AntivirusAvSolution}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Double] + # Optional. + # Provides the multiplication value for an archive in total based on the initial object being validated. + # This value takes the root object size and multiplies it by this value to create a maximum. + # Once this maximum is exceeded, the archive is failed. + # Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + ${ArchiveMaximumCompressionRatioLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The maximum depth of nested archives that can be expanded. + # Limits how many layers of embedded archives will be processed. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumDepthLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumExpansionSizeLimit}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # The minimum archive file size (in bytes) required to trigger expansion during replication. + # Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + ${ArchiveMinimumSizeForExpansion}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Specifies the maximum allowed size (in bytes) for files to be replicated. + # Any file size greater than maximum will be denied replication. + ${DataSizeMaximum}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # Specifies the minimum required size (in bytes) for a file to be eligible for replication. + # Any file size less than minimum will be denied replication. + ${DataSizeMinimum}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A user-defined description of the FlowProfile. + ${Description}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [ADT.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IMimeTypeFilter[]] + # Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. + # For more detail, please refer to the MimeTypeFiler model. + ${MimeFilter}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + [ADT.Category('Body')] + [System.String] + # Specifies whether the filter is an allow list or deny list. + # For more detail, please refer to the FilterType model. + ${MimeFilterType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + [ADT.Category('Body')] + [System.String] + # The data replication scenario handled by this FlowProfile. + # Please not, that this value cannot be updated after creation. + ${ReplicationScenario}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + [ADT.Category('Body')] + [System.String] + # The operational status of the FlowProfile. + ${Status}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.ITextMatch[]] + # A list of text patterns to block, each with matching rules and case sensitivity options. + ${TextMatchingDeny}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IUserAssignedIdentities]))] + [System.Collections.Hashtable] + # The set of user assigned identities associated with the resource. + # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + # The dictionary values can be empty objects ({}) in requests. + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The default XML namespace used for schema validation. + ${XmlFilterDefaultNamespace}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Inline")] + [ADT.Category('Body')] + [System.String] + # Defines the method for referencing the xml schema. + ${XmlFilterReference}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The inline XSD schema to be used for validation. + ${XmlFilterSchema}, + + [Parameter(ParameterSetName='CreateViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the Create operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='CreateViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the Create operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\New-AzDataTransferFlowProfile_CreateExpanded'; + CreateViaJsonFilePath = 'Az.DataTransfer.private\New-AzDataTransferFlowProfile_CreateViaJsonFilePath'; + CreateViaJsonString = 'Az.DataTransfer.private\New-AzDataTransferFlowProfile_CreateViaJsonString'; + } + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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 +Create the flow resource. +.Description +Create the flow resource. +.Example +New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Confirm:$false +.Example +New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -Location "EastUS" -FlowType "Mission" -DataType "Blob" -StorageAccountName "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup01/providers/Microsoft.Storage/storageAccounts/storageAccount01" -StorageContainerName "teststorage" -Status Enabled -Tag @{Environment="Production"} -Confirm:$false +.Example +New-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName BasicReceiveConnection01 -Name BasicRecvBlobFiles01 -Location "CentralUS" -Status "Enabled" -FlowDataType "Blob" -FlowProfilePipeline "Pipeline01" -FlowProfileName "BasicFlowProfile01" -FlowProfileReplicationScenario "Files" -FlowProfileStatus "Enabled" -FlowProfileId "000000000000-0000-0000-00000000" -FlowProfileDescription "Basic flow profile for file replication" -Confirm:$false + +.Outputs +ADT.Models.IFlow +.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. + +APIFLOWOPTIONAUTHENTICATION : Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + [ApplicationId >]: List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + [Audience ]: Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a value is not provided. + [Authority ]: The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication context. + [ClientIdOverride ]: The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. This field specifies the user provided app's clientId. + [IdentityTranslation ]: Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + [Instance ]: The identity provider's token service instance. + [TenantId ]: A unique identifier representing the tenant of the identity provider's token service. + [Type ]: Type of authentication mechanism. JWT by default. + +REMOTEENDPOINTSETTINGAUTHENTICATION : Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + [ApplicationId >]: List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + [Audience ]: Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a value is not provided. + [Authority ]: The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication context. + [ClientIdOverride ]: The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. This field specifies the user provided app's clientId. + [IdentityTranslation ]: Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + [Instance ]: The identity provider's token service instance. + [TenantId ]: A unique identifier representing the tenant of the identity provider's token service. + [Type ]: Type of authentication mechanism. JWT by default. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/new-azdatatransferflow +#> +function New-AzDataTransferFlow { +[OutputType([ADT.Models.IFlow])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name for the connection to perform the operation on. + ${ConnectionName}, + + [Parameter(Mandatory)] + [Alias('FlowName')] + [ADT.Category('Path')] + [System.String] + # The name for the flow to perform the operation on. ${Name}, [Parameter(Mandatory)] @@ -3036,9 +3778,20 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Optional field to override the audience of the remote endpoint + # Optional field to override the audience of the remote endpoint. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionAudienceOverride}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IAuthentication[]] + # Optional and for advanced used only. + # A list of authentication methods to use when accessing the Azure Data Transfer API Flow. + # If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + ${ApiFlowOptionAuthentication}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] @@ -3049,25 +3802,33 @@ param( [ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] [ADT.Category('Body')] [System.String] - # Flag for if Azure Data Transfer API Flow should extract the user token + # Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionIdentityTranslation}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Remote stub app registration Client ID + # Remote stub app registration Client ID. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionRemoteCallingModeClientId}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Remote host to which communication needs to be made + # Remote host to which communication needs to be made. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the remoteEndpointSettings.endpoint property instead. ${ApiFlowOptionRemoteEndpoint}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # Sender's app user assigned Manage Identity client ID + # Sender's app user assigned Manage Identity client ID. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use the authentication property instead. ${ApiFlowOptionSenderClientId}, [Parameter(ParameterSetName='CreateExpanded')] @@ -3097,41 +3858,93 @@ param( [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] - # The URI to the customer managed key for this flow - ${CustomerManagedKeyVaultUri}, + # The URI to the customer managed key for this flow + ${CustomerManagedKeyVaultUri}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Blob", "Table")] + [ADT.Category('Body')] + [System.String] + # Type of data to transfer via the flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. + ${DataType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [System.String[]] + # The destination endpoints of the stream + ${DestinationEndpoint}, + + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [System.Int64[]] + # The destination endpoint ports of the stream + ${DestinationEndpointPort}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # Event Hub ID + ${EventHubId}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + [ADT.Category('Body')] + [System.String] + # The Flow's data class. + ${FlowDataType}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A description of the FlowProfile and its rulesets. + # The description should describe the flowprofile's purpose and rulesets applied. + ${FlowProfileDescription}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # A guid represented as a string for the FlowProfile resource, assigned by the system. + ${FlowProfileId}, [Parameter(ParameterSetName='CreateExpanded')] - [ADT.PSArgumentCompleterAttribute("Blob", "Table")] [ADT.Category('Body')] [System.String] - # Type of data to transfer via the flow. - ${DataType}, + # The name of the FlowProfile. + ${FlowProfileName}, [Parameter(ParameterSetName='CreateExpanded')] - [AllowEmptyCollection()] [ADT.Category('Body')] - [System.String[]] - # The destination endpoints of the stream - ${DestinationEndpoint}, + [System.String] + # The name of the parent Pipeline Azure resource associated with this FlowProfile. + ${FlowProfilePipeline}, [Parameter(ParameterSetName='CreateExpanded')] - [AllowEmptyCollection()] + [ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] [ADT.Category('Body')] - [System.Int64[]] - # The destination endpoint ports of the stream - ${DestinationEndpointPort}, + [System.String] + # The data replication scenario handled by this FlowProfile. + # Please note, that this value cannot be updated after creation. + # See the FlowProfilePatchProperties to see updateable properties. + ${FlowProfileReplicationScenario}, [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] [ADT.Category('Body')] [System.String] - # Event Hub ID - ${EventHubId}, + # The operational status of the FlowProfile. + ${FlowProfileStatus}, [Parameter(ParameterSetName='CreateExpanded')] [ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] [ADT.Category('Body')] [System.String] - # The flow type for this flow + # The flow type for this flow. + # The property has reached end of life support starting version 2025-05-30-preview. + # Please create and use a FlowProfile resource instead. ${FlowType}, [Parameter(ParameterSetName='CreateExpanded')] @@ -3148,6 +3961,15 @@ param( # Billing tier for this messaging flow ${MessagingOptionBillingTier}, + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + [ADT.Category('Body')] + [System.String] + # Field indicating whether to enable guaranteed delivery on the flow or not. + # The default disabled option chooses speed over consistency. + # When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + ${MessagingOptionPerformancePriority}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] @@ -3195,6 +4017,21 @@ param( # Name of the connection ${PropertiesConnectionName}, + [Parameter(ParameterSetName='CreateExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IAuthentication[]] + # Optional and for advanced used only. + # A list of authentication methods to use when accessing the remote endpoint. + # If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + ${RemoteEndpointSettingAuthentication}, + + [Parameter(ParameterSetName='CreateExpanded')] + [ADT.Category('Body')] + [System.String] + # The remote endpoint uri all API calls. + ${RemoteEndpointSettingEndpoint}, + [Parameter(ParameterSetName='CreateExpanded')] [ADT.Category('Body')] [System.String] @@ -3437,7 +4274,234 @@ begin { CreateViaJsonFilePath = 'Az.DataTransfer.private\New-AzDataTransferFlow_CreateViaJsonFilePath'; CreateViaJsonString = 'Az.DataTransfer.private\New-AzDataTransferFlow_CreateViaJsonString'; } - if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('CreateExpanded', 'CreateViaJsonFilePath', 'CreateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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 the connection resource. +.Description +Deletes the connection resource. +.Example +Remove-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 +.Example +$result = Remove-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 -PassThru -Confirm:$false + +.Inputs +ADT.Models.IDataTransferIdentity +.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 + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferconnection +#> +function Remove-AzDataTransferConnection { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ConnectionName')] + [ADT.Category('Path')] + [System.String] + # The name for the connection to perform the operation on. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\Remove-AzDataTransferConnection_Delete'; + DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferConnection_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3499,13 +4563,13 @@ end { <# .Synopsis -Deletes the connection resource. +Deletes the flow resource. .Description -Deletes the connection resource. +Deletes the flow resource. .Example -Remove-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 +Remove-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 .Example -$result = Remove-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 -PassThru -Confirm:$false +$result = Remove-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -PassThru -Confirm:$false .Inputs ADT.Models.IDataTransferIdentity @@ -3516,25 +4580,42 @@ 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. +CONNECTIONINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link -https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferconnection +https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferflow #> -function Remove-AzDataTransferConnection { +function Remove-AzDataTransferFlow { [OutputType([System.Boolean])] [CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='Delete', Mandatory)] - [Alias('ConnectionName')] [ADT.Category('Path')] [System.String] # The name for the connection to perform the operation on. + ${ConnectionName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityConnection', Mandatory)] + [Alias('FlowName')] + [ADT.Category('Path')] + [System.String] + # The name for the flow to perform the operation on. ${Name}, [Parameter(ParameterSetName='Delete', Mandatory)] @@ -3558,6 +4639,12 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='DeleteViaIdentityConnection', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${ConnectionInputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] @@ -3660,8 +4747,9 @@ begin { } $mapping = @{ - Delete = 'Az.DataTransfer.private\Remove-AzDataTransferConnection_Delete'; - DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferConnection_DeleteViaIdentity'; + Delete = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_Delete'; + DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_DeleteViaIdentity'; + DeleteViaIdentityConnection = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_DeleteViaIdentityConnection'; } if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -3725,67 +4813,57 @@ end { <# .Synopsis -Deletes the flow resource. +Update the connection resource. .Description -Deletes the flow resource. -.Example -Remove-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 +Update the connection resource. .Example -$result = Remove-AzDataTransferFlow -ResourceGroupName ResourceGroup01 -ConnectionName Connection01 -Name Flow01 -PassThru -Confirm:$false +Update-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 -Tag @{Environment="Production"; Department="IT"} -Confirm:$false .Inputs ADT.Models.IDataTransferIdentity .Outputs -System.Boolean +ADT.Models.IConnection .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. -CONNECTIONINPUTOBJECT : Identity Parameter - [ConnectionName ]: The name for the connection to perform the operation on. - [FlowName ]: The name for the flow to perform the operation on. - [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. - [ResourceGroupName ]: The name of the resource group. The name is case insensitive. - [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. - INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link -https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferflow +https://learn.microsoft.com/powershell/module/az.datatransfer/update-azdatatransferconnection #> -function Remove-AzDataTransferFlow { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Update-AzDataTransferConnection { +[OutputType([ADT.Models.IConnection])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('ConnectionName')] [ADT.Category('Path')] [System.String] # The name for the connection to perform the operation on. - ${ConnectionName}, - - [Parameter(ParameterSetName='Delete', Mandatory)] - [Parameter(ParameterSetName='DeleteViaIdentityConnection', Mandatory)] - [Alias('FlowName')] - [ADT.Category('Path')] - [System.String] - # The name for the flow to perform the operation on. ${Name}, - [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] # The name of the resource group. # The name is case insensitive. ${ResourceGroupName}, - [Parameter(ParameterSetName='Delete')] + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] [ADT.Category('Path')] [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] @@ -3793,17 +4871,49 @@ param( # The value must be an UUID. ${SubscriptionId}, - [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] [ADT.Category('Path')] [ADT.Models.IDataTransferIdentity] # Identity Parameter ${InputObject}, - [Parameter(ParameterSetName='DeleteViaIdentityConnection', Mandatory, ValueFromPipeline)] - [ADT.Category('Path')] - [ADT.Models.IDataTransferIdentity] - # Identity Parameter - ${ConnectionInputObject}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [ADT.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IConnectionsPatchTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IUserAssignedIdentities]))] + [System.Collections.Hashtable] + # The set of user assigned identities associated with the resource. + # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + # The dictionary values can be empty objects ({}) in requests. + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] @@ -3846,12 +4956,6 @@ param( # Run the command asynchronously ${NoWait}, - [Parameter()] - [ADT.Category('Runtime')] - [System.Management.Automation.SwitchParameter] - # Returns true when the command succeeds - ${PassThru}, - [Parameter(DontShow)] [ADT.Category('Runtime')] [System.Uri] @@ -3907,11 +5011,12 @@ begin { } $mapping = @{ - Delete = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_Delete'; - DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_DeleteViaIdentity'; - DeleteViaIdentityConnection = 'Az.DataTransfer.private\Remove-AzDataTransferFlow_DeleteViaIdentityConnection'; + UpdateExpanded = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaIdentityExpanded'; + UpdateViaJsonFilePath = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaJsonString'; } - if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') } else { @@ -3973,16 +5078,18 @@ end { <# .Synopsis -Update the connection resource. +Applies partial update to an existing FlowProfile resource. .Description -Update the connection resource. +Applies partial update to an existing FlowProfile resource. .Example -Update-AzDataTransferConnection -ResourceGroupName ResourceGroup01 -Name Connection01 -Tag @{Environment="Production"; Department="IT"} -Confirm:$false +Update-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "files-flowprofile" -Status "Disabled" -Description "Updated FlowProfile - temporarily disabled for maintenance" +.Example +Update-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "files-flowprofile" -AntivirusAvSolution @("Defender") -Status "Enabled" .Inputs ADT.Models.IDataTransferIdentity .Outputs -ADT.Models.IConnection +ADT.Models.IFlowProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -3991,26 +5098,55 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +MIMEFILTER : Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model. + [Extension >]: A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, use an empty string ""." + [Media ]: The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +TEXTMATCHINGDENY : A list of text patterns to block, each with matching rules and case sensitivity options. + CaseSensitivity : Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + MatchType : Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + Text : The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. .Link -https://learn.microsoft.com/powershell/module/az.datatransfer/update-azdatatransferconnection +https://learn.microsoft.com/powershell/module/az.datatransfer/update-azdatatransferflowprofile #> -function Update-AzDataTransferConnection { -[OutputType([ADT.Models.IConnection])] +function Update-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile])] [CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] - [Alias('ConnectionName')] + [Alias('FlowProfileName')] [ADT.Category('Path')] [System.String] - # The name for the connection to perform the operation on. + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. ${Name}, + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] @@ -4036,8 +5172,99 @@ param( # Identity Parameter ${InputObject}, + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + [ADT.Category('Body')] + [System.String[]] + # Optional. + # The list of antiviruses to be used as a scanning solution for replicating data. + ${AntivirusAvSolution}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Double] + # Optional. + # Provides the multiplication value for an archive in total based on the initial object being validated. + # This value takes the root object size and multiplies it by this value to create a maximum. + # Once this maximum is exceeded, the archive is failed. + # Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + ${ArchiveMaximumCompressionRatioLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The maximum depth of nested archives that can be expanded. + # Limits how many layers of embedded archives will be processed. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumDepthLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumExpansionSizeLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # The minimum archive file size (in bytes) required to trigger expansion during replication. + # Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + ${ArchiveMinimumSizeForExpansion}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Specifies the maximum allowed size (in bytes) for files to be replicated. + # Any file size greater than maximum will be denied replication. + ${DataSizeMaximum}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # Specifies the minimum required size (in bytes) for a file to be eligible for replication. + # Any file size less than minimum will be denied replication. + ${DataSizeMinimum}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # A description of the FlowProfile that defines the replication scenario. + ${Description}, + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] [ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] [ADT.Category('Body')] [System.String] @@ -4046,14 +5273,54 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IMimeTypeFilter[]] + # Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. + # For more detail, please refer to the MimeTypeFiler model. + ${MimeFilter}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Allow", "Deny")] [ADT.Category('Body')] - [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IConnectionsPatchTags]))] + [System.String] + # Specifies whether the filter is an allow list or deny list. + # For more detail, please refer to the FilterType model. + ${MimeFilterType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + [ADT.Category('Body')] + [System.String] + # The operational status of the FlowProfile. + ${Status}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IFlowProfilePatchTags]))] [System.Collections.Hashtable] # Resource tags. ${Tag}, [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.ITextMatch[]] + # A list of text patterns to block, each with matching rules and case sensitivity options. + ${TextMatchingDeny}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] [ADT.Category('Body')] [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IUserAssignedIdentities]))] [System.Collections.Hashtable] @@ -4062,6 +5329,31 @@ param( # The dictionary values can be empty objects ({}) in requests. ${UserAssignedIdentity}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # The default XML namespace used for schema validation. + ${XmlFilterDefaultNamespace}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Inline")] + [ADT.Category('Body')] + [System.String] + # Defines the method for referencing the xml schema. + ${XmlFilterReference}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # The inline XSD schema to be used for validation. + ${XmlFilterSchema}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [ADT.Category('Body')] [System.String] @@ -4170,10 +5462,11 @@ begin { } $mapping = @{ - UpdateExpanded = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateExpanded'; - UpdateViaIdentityExpanded = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaIdentityExpanded'; - UpdateViaJsonFilePath = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaJsonFilePath'; - UpdateViaJsonString = 'Az.DataTransfer.private\Update-AzDataTransferConnection_UpdateViaJsonString'; + UpdateExpanded = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaIdentityExpanded'; + UpdateViaIdentityPipelineExpanded = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded'; + UpdateViaJsonFilePath = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaJsonString'; } if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { if ($testPlayback) { @@ -4255,16 +5548,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferConnection.ps1 index b13ef100ba86..93df16664105 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferConnection.ps1 @@ -36,8 +36,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferFlow.ps1 index 8cdc70a737d5..4c8ffb8f90d9 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Remove-AzDataTransferFlow.ps1 @@ -36,16 +36,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferConnection.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferConnection.ps1 index 8082532c7ce5..00d08a4f01b7 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferConnection.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferConnection.ps1 @@ -34,8 +34,9 @@ To create the parameters described below, construct a hash table containing the INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlow.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlow.ps1 index ca2185b4e5c4..52304050f553 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlow.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlow.ps1 @@ -34,16 +34,18 @@ To create the parameters described below, construct a hash table containing the CONNECTIONINPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link diff --git a/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlowProfile.ps1 b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlowProfile.ps1 new file mode 100644 index 000000000000..aba26efaca0b --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/exports/Update-AzDataTransferFlowProfile.ps1 @@ -0,0 +1,467 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Applies partial update to an existing FlowProfile resource. +.Description +Applies partial update to an existing FlowProfile resource. +.Example +Update-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "files-flowprofile" -Status "Disabled" -Description "Updated FlowProfile - temporarily disabled for maintenance" +.Example +Update-AzDataTransferFlowProfile -PipelineName "Pipeline01" -ResourceGroupName "ResourceGroup01" -FlowProfileName "files-flowprofile" -AntivirusAvSolution @("Defender") -Status "Enabled" + +.Inputs +ADT.Models.IDataTransferIdentity +.Outputs +ADT.Models.IFlowProfile +.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 + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +MIMEFILTER : Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model. + [Extension >]: A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, use an empty string ""." + [Media ]: The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +TEXTMATCHINGDENY : A list of text patterns to block, each with matching rules and case sensitivity options. + CaseSensitivity : Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + MatchType : Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + Text : The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/update-azdatatransferflowprofile +#> +function Update-AzDataTransferFlowProfile { +[OutputType([ADT.Models.IFlowProfile])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaJsonFilePath')] + [Parameter(ParameterSetName='UpdateViaJsonString')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + [ADT.Category('Body')] + [System.String[]] + # Optional. + # The list of antiviruses to be used as a scanning solution for replicating data. + ${AntivirusAvSolution}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Double] + # Optional. + # Provides the multiplication value for an archive in total based on the initial object being validated. + # This value takes the root object size and multiplies it by this value to create a maximum. + # Once this maximum is exceeded, the archive is failed. + # Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + ${ArchiveMaximumCompressionRatioLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The maximum depth of nested archives that can be expanded. + # Limits how many layers of embedded archives will be processed. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumDepthLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. + # Archives exceeding the max limit will be denied for replication. + ${ArchiveMaximumExpansionSizeLimit}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # The minimum archive file size (in bytes) required to trigger expansion during replication. + # Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + ${ArchiveMinimumSizeForExpansion}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Specifies the maximum allowed size (in bytes) for files to be replicated. + # Any file size greater than maximum will be denied replication. + ${DataSizeMaximum}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.Int64] + # Optional. + # Default is 0. + # Specifies the minimum required size (in bytes) for a file to be eligible for replication. + # Any file size less than minimum will be denied replication. + ${DataSizeMinimum}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # A description of the FlowProfile that defines the replication scenario. + ${Description}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [ADT.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.IMimeTypeFilter[]] + # Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. + # For more detail, please refer to the MimeTypeFiler model. + ${MimeFilter}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + [ADT.Category('Body')] + [System.String] + # Specifies whether the filter is an allow list or deny list. + # For more detail, please refer to the FilterType model. + ${MimeFilterType}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + [ADT.Category('Body')] + [System.String] + # The operational status of the FlowProfile. + ${Status}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IFlowProfilePatchTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [AllowEmptyCollection()] + [ADT.Category('Body')] + [ADT.Models.ITextMatch[]] + # A list of text patterns to block, each with matching rules and case sensitivity options. + ${TextMatchingDeny}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [ADT.Runtime.Info(PossibleTypes=([ADT.Models.IUserAssignedIdentities]))] + [System.Collections.Hashtable] + # The set of user assigned identities associated with the resource. + # The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + # The dictionary values can be empty objects ({}) in requests. + ${UserAssignedIdentity}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # The default XML namespace used for schema validation. + ${XmlFilterDefaultNamespace}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.PSArgumentCompleterAttribute("Inline")] + [ADT.Category('Body')] + [System.String] + # Defines the method for referencing the xml schema. + ${XmlFilterReference}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityPipelineExpanded')] + [ADT.Category('Body')] + [System.String] + # The inline XSD schema to be used for validation. + ${XmlFilterSchema}, + + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Path of Json file supplied to the Update operation + ${JsonFilePath}, + + [Parameter(ParameterSetName='UpdateViaJsonString', Mandatory)] + [ADT.Category('Body')] + [System.String] + # Json string supplied to the Update operation + ${JsonString}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $context = Get-AzContext + if (-not $context -and -not $testPlayback) { + Write-Error "No Azure login detected. Please run 'Connect-AzAccount' to log in." + exit + } + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [ADT.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.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaIdentityExpanded'; + UpdateViaIdentityPipelineExpanded = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded'; + UpdateViaJsonFilePath = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaJsonFilePath'; + UpdateViaJsonString = 'Az.DataTransfer.private\Update-AzDataTransferFlowProfile_UpdateViaJsonString'; + } + if (('UpdateExpanded', 'UpdateViaJsonFilePath', 'UpdateViaJsonString') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [ADT.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [ADT.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [ADT.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $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 '') { + [ADT.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/generated/DataTransfer/DataTransfer.Autorest/generate-info.json b/generated/DataTransfer/DataTransfer.Autorest/generate-info.json index df3e844b8d95..f028b6e5e53f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generate-info.json +++ b/generated/DataTransfer/DataTransfer.Autorest/generate-info.json @@ -1,3 +1,3 @@ { - "generate_Id": "995ae0b3-5f6b-41c4-afb7-ad9678833aca" + "generate_Id": "20609426-b92c-4807-a758-9ab12ecd2318" } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/DataTransfer.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/DataTransfer.cs index f71ef07149b7..11e4b25bc349 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/DataTransfer.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/DataTransfer.cs @@ -14,11 +14,8 @@ namespace ADT public partial class DataTransfer { - /// update the connection resource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// The request body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -28,20 +25,15 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AzureDataTransferListFlowProfiles(ADT.Models.IListFlowProfilesRequest body, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -50,7 +42,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -59,13 +51,13 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.AzureDataTransferListFlowProfiles_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. /// - /// Connection body + /// The request body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -75,32 +67,24 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task AzureDataTransferListFlowProfilesViaIdentity(global::System.String viaIdentity, ADT.Models.IListFlowProfilesRequest body, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.AzureDataTransfer$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.AzureDataTransfer'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -109,7 +93,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -118,46 +102,38 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.AzureDataTransferListFlowProfiles_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. /// - /// Connection body + /// The request body /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the - /// response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task> AzureDataTransferListFlowProfilesViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IListFlowProfilesRequest body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Microsoft.AzureDataTransfer$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/providers/Microsoft.AzureDataTransfer'"); } // replace URI parameters with values from identity - var subscriptionId = _match.Groups["subscriptionId"].Value; - var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + subscriptionId - + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -166,7 +142,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -175,15 +151,12 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.AzureDataTransferListFlowProfilesWithResult_Call (request, eventListener,sender); } } - /// update the connection resource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsCreateOrUpdate operation + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// Json string supplied to the AzureDataTransferListFlowProfiles operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -192,20 +165,15 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task AzureDataTransferListFlowProfilesViaJsonString(global::System.String jsonString, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -214,7 +182,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -223,35 +191,27 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.AzureDataTransferListFlowProfiles_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsCreateOrUpdate operation + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// Json string supplied to the AzureDataTransferListFlowProfiles operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the - /// response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task> AzureDataTransferListFlowProfilesViaJsonStringWithResult(global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -260,7 +220,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -269,36 +229,28 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.AzureDataTransferListFlowProfilesWithResult_Call (request, eventListener,sender); } } - /// update the connection resource. - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// The request body /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the - /// response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task> AzureDataTransferListFlowProfilesWithResult(ADT.Models.IListFlowProfilesRequest body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( - "/subscriptions/" - + global::System.Uri.EscapeDataString(subscriptionId) - + "/resourceGroups/" - + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + "/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -307,7 +259,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -316,123 +268,31 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + return await this.AzureDataTransferListFlowProfilesWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the - /// response is completed. + /// A + /// that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task> AzureDataTransferListFlowProfilesWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new ADT.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - break; - } await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -441,7 +301,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => If( ADT.Runtime.Json.JsonArray.Parse(body.Result) as ADT.Runtime.Json.JsonArray, out var __y) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__y, (__x)=>(ADT.Models.IFlowProfileMetadata) (ADT.Models.FlowProfileMetadata.FromJson(__x) )) ))() : null); return await _result; } default: @@ -474,7 +334,7 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -484,184 +344,81 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task AzureDataTransferListFlowProfiles_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func>, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: azure-async-operation - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => If( ADT.Runtime.Json.JsonArray.Parse(body.Result) as ADT.Runtime.Json.JsonArray, out var __y) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__y, (__x)=>(ADT.Models.IFlowProfileMetadata) (ADT.Models.FlowProfileMetadata.FromJson(__x) )) ))() : null)); + break; } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); - - // drop the old response - _response?.Dispose(); - - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { - var error = false; - try { - if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) - { - var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); - if( state is null ) - { - // the body doesn't contain any information that has the state of the LRO - // we're going to just get out, and let the consumer have the result - break; - } - - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; - - default: - // need to keep polling! - _response.StatusCode = global::System.Net.HttpStatusCode.Created; - continue; - } - } - } catch { - // if we run into a problem peeking into the result, - // we really don't want to do anything special. - } - if (error) { - throw new ADT.Runtime.UndeclaredResponseException(_response); - } - } - - // check for terminal status code - if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - continue; - } - // we are done polling, do a request on final target? - // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); - - // drop the old response - _response?.Dispose(); - - // make the final call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - break; - } - await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) - { - case global::System.Net.HttpStatusCode.OK: - { - await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - default: - { - await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; - } - } - } - finally - { - // finally statements - await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } /// - /// Validation method for method. Call this like the actual call, but you will get - /// validation events back. + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. /// - /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The request body /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task AzureDataTransferListFlowProfiles_Validate(ADT.Models.IListFlowProfilesRequest body, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { - await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); - await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(connectionName),connectionName); - await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); - await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); - await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes the connection resource. + /// update the connection resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name for the connection to perform the operation on. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Connection body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsDelete(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -681,29 +438,34 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Deletes the connection resource. + /// update the connection resource. /// - /// a delegate that is called when the remote service returns 204 (NoContent). + /// Connection body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -735,18 +497,81 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// a delegate that is called when the remote service returns 204 (NoContent). + /// update the connection resource. + /// + /// Connection body + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -755,56 +580,193 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters using( NoSynchronizationContext ) { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } - await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } - _response = await sendTask; - await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"Location"); - var operationLocation = _response.GetFirstHeader(@"Operation-Location"); - while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) - { - // delay before making the next polling request - await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // while we wait, let's grab the headers and get ready to poll. - if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { - asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { - location = _response.GetFirstHeader(@"Location"); - } - if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { - operationLocation = _response.GetFirstHeader(@"Operation-Location"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); - - // and let's look at the current response body and see if we have some information we can give back to the listener - var content = await _response.Content.ReadAsStringAsync(); + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the polling call - _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // if we got back an OK, take a peek inside and see if it's done - if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) - { + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsCreateOrUpdate operation + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsCreateOrUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { var error = false; try { if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) @@ -849,16 +811,2032 @@ public partial class DataTransfer } // we are done polling, do a request on final target? // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); // drop the old response _response?.Dispose(); // make the final call _response = await sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } break; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnection body, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(connectionName),connectionName); + await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); + await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); + await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsDelete(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Deletes the connection resource. + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(connectionName),connectionName); + await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); + await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); + await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + } + } + + /// Gets connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsGet(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connection resource. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connection resource. + /// + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Gets connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsGetWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(connectionName),connectionName); + await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); + await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); + await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + } + } + + /// Links the connection to its pending connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLink(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Links the connection to its pending connection. + /// + /// Connection body + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLinkViaIdentity(global::System.String viaIdentity, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Links the connection to its pending connection. + /// + /// Connection body + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLinkViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var connectionName = _match.Groups["connectionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections/" + + connectionName + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + } + } + + /// Links the connection to its pending connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsLink operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLinkViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Links the connection to its pending connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsLink operation + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLinkViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + } + } + + /// Links the connection to its pending connection. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsLinkWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "/link" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsLinkWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsLink_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsLink_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(connectionName),connectionName); + await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); + await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); + await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Gets connections in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connections in a resource group. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connections in a resource group. + /// + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// Gets connections in a resource group. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsListByResourceGroupWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// Gets connections in a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connections in a subscription. + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// Gets connections in a subscription. + /// + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// Gets connections in a subscription. + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionWithResult(string subscriptionId, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Microsoft.AzureDataTransfer/connections" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsListBySubscriptionWithResult_Call (request, eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling + /// of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + return await _result; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + // Error Response : default + var code = (await _result)?.Code; + var message = (await _result)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(_response, await _result); + throw ex; + } + else + { + throw new global::System.Exception($"[{code}] : {message}"); + } + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -867,13 +2845,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response); - break; - } - case global::System.Net.HttpStatusCode.NoContent: - { - await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -895,47 +2867,40 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will get validation - /// events back. + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. /// /// The ID of the target subscription. The value must be an UUID. - /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsDelete_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectionsListBySubscription_Validate(string subscriptionId, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); - await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(connectionName),connectionName); - await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); - await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); - await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); } } - /// Gets connection resource. + /// update the connection resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name for the connection to perform the operation on. + /// Connection body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsGet(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsUpdate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -955,28 +2920,34 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connection resource. + /// update the connection resource. /// + /// Connection body /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IConnectionsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1008,26 +2979,32 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsGet_Call (request, onOk,onDefault,eventListener,sender); + await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connection resource. + /// update the connection resource. /// + /// Connection body /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . /// /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1059,28 +3036,128 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsGetWithResult_Call (request, eventListener,sender); + return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); } } - /// Gets connection resource. + /// update the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsUpdate operation + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + } + } + + /// update the connection resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name for the connection to perform the operation on. + /// Json string supplied to the ConnectionsUpdate operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task ConnectionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/connections/" + + global::System.Uri.EscapeDataString(connectionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(jsonString, global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// update the connection resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name for the connection to perform the operation on. + /// Connection body + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// A that will be complete when handling of the + /// response is completed. + /// + public async global::System.Threading.Tasks.Task ConnectionsUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1096,38 +3173,135 @@ public partial class DataTransfer + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Patch, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null, serializationMode).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } + // make the call + return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the + /// response is completed. + /// + internal async global::System.Threading.Tasks.Task ConnectionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } - // generate request object - var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Get, _url); - await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; - await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } - // make the call - return await this.ConnectionsGetWithResult_Call (request, eventListener,sender); - } - } + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } - /// Actual wire call for method. - /// the prepared HttpRequestMessage to send. - /// an instance that will receive events. - /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. - /// - /// A that will be complete when handling of the - /// response is completed. - /// - internal async global::System.Threading.Tasks.Task ConnectionsGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) - { - using( NoSynchronizationContext ) - { - global::System.Net.Http.HttpResponseMessage _response = null; - try - { - var sendTask = sender.SendAsync(request, eventListener); - await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return null; } - _response = await sendTask; - await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } + break; + } await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return null; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1169,7 +3343,7 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1179,17 +3353,110 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task ConnectionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { global::System.Net.Http.HttpResponseMessage _response = null; try { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; var sendTask = sender.SendAsync(request, eventListener); await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } _response = await sendTask; await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1220,17 +3487,18 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// The name for the connection to perform the operation on. + /// Connection body /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsGet_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1243,14 +3511,18 @@ public partial class DataTransfer await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile resource definition to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1260,9 +3532,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLink(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfile body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1272,9 +3544,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1283,7 +3556,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -1292,13 +3565,13 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// - /// Connection body + /// The FlowProfile resource definition to create or update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1308,33 +3581,35 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLinkViaIdentity(global::System.String viaIdentity, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IFlowProfile body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1343,7 +3618,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -1352,47 +3627,49 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// - /// Connection body + /// The FlowProfile resource definition to create or update. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLinkViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IFlowProfile body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1401,7 +3678,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -1410,15 +3687,17 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsLink operation + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// Json string supplied to the FlowProfilesCreateOrUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1427,9 +3706,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLinkViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1439,9 +3718,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1450,7 +3730,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } @@ -1459,24 +3739,26 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsLink_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesCreateOrUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsLink operation + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// Json string supplied to the FlowProfilesCreateOrUpdate operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLinkViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1486,9 +3768,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1497,7 +3780,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -1506,25 +3789,27 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Links the connection to its pending connection. + /// update a new FlowProfile or update an existing one. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile resource definition to create or update. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsLinkWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfile body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1534,9 +3819,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) - + "/link" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1545,7 +3831,7 @@ public partial class DataTransfer // generate request object var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); - var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Post, _url); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Put, _url); await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return null; } await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } @@ -1554,19 +3840,21 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsLinkWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesCreateOrUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// + /// Actual wire call for method. + /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsLinkWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1580,8 +3868,7 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return null; } _response = await sendTask; await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - // declared final-state-via: location - var _finalUri = _response.GetFirstHeader(@"Location"); + // declared final-state-via: azure-async-operation var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); var operationLocation = _response.GetFirstHeader(@"Operation-Location"); @@ -1660,7 +3947,7 @@ public partial class DataTransfer } // we are done polling, do a request on final target? // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), ADT.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -1678,7 +3965,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -1711,8 +3998,292 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 0); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(ADT.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + var operationLocation = _response.GetFirstHeader(@"Operation-Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + // delay before making the next polling request + await eventListener.Signal(ADT.Runtime.Events.DelayBeforePolling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Operation-Location"))) { + operationLocation = _response.GetFirstHeader(@"Operation-Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? global::System.String.IsNullOrEmpty(operationLocation) ? _originalUri : operationLocation : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), ADT.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( ADT.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is ADT.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new ADT.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), ADT.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(ADT.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + await eventListener.Signal(ADT.Runtime.Events.Progress, "intentional placeholder", 100); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ErrorResponse.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(ADT.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile resource definition to create or update. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlowProfilesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfile body, ADT.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(pipelineName),pipelineName); + await eventListener.AssertMinimumLength(nameof(pipelineName),pipelineName,3); + await eventListener.AssertMaximumLength(nameof(pipelineName),pipelineName,64); + await eventListener.AssertRegEx(nameof(pipelineName), pipelineName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(flowProfileName),flowProfileName); + await eventListener.AssertMinimumLength(nameof(flowProfileName),flowProfileName,3); + await eventListener.AssertMaximumLength(nameof(flowProfileName),flowProfileName,64); + await eventListener.AssertRegEx(nameof(flowProfileName), flowProfileName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Deletes the specified FlowProfile resource. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlowProfilesDelete(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlowProfilesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Deletes the specified FlowProfile resource. + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlowProfilesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-05-30-preview"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(ADT.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(ADT.Runtime.Method.Delete, _url); + await eventListener.Signal(ADT.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlowProfilesDelete_Call (request, onNoContent,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1721,7 +4292,7 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsLink_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -1833,7 +4404,13 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response); + break; + } + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); break; } default: @@ -1855,18 +4432,19 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsLink_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FlowProfilesDelete_Validate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -1875,18 +4453,23 @@ public partial class DataTransfer await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(connectionName),connectionName); - await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); - await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); - await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); - await eventListener.AssertNotNull(nameof(body), body); - await eventListener.AssertObjectIsValid(nameof(body), body); + await eventListener.AssertNotNull(nameof(pipelineName),pipelineName); + await eventListener.AssertMinimumLength(nameof(pipelineName),pipelineName,3); + await eventListener.AssertMaximumLength(nameof(pipelineName),pipelineName,64); + await eventListener.AssertRegEx(nameof(pipelineName), pipelineName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(flowProfileName),flowProfileName); + await eventListener.AssertMinimumLength(nameof(flowProfileName),flowProfileName,3); + await eventListener.AssertMaximumLength(nameof(flowProfileName),flowProfileName,64); + await eventListener.AssertRegEx(nameof(flowProfileName), flowProfileName, @"^[a-zA-Z0-9-]{3,64}$"); } } - /// Gets connections in a resource group. + /// Retrieves the specified FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -1895,9 +4478,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesGet(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1907,7 +4490,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1921,11 +4507,11 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connections in a resource group. + /// Retrieves the specified FlowProfile resource. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1935,30 +4521,35 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1972,42 +4563,47 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsListByResourceGroup_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesGet_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connections in a resource group. + /// Retrieves the specified FlowProfile resource. /// /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling - /// of the response is completed. + /// A that will be complete when handling of the + /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesGetViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2021,22 +4617,25 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesGetWithResult_Call (request, eventListener,sender); } } - /// Gets connections in a resource group. + /// Retrieves the specified FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling - /// of the response is completed. + /// A that will be complete when handling of the + /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesGetWithResult(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2046,7 +4645,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2060,21 +4662,19 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsListByResourceGroupWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesGetWithResult_Call (request, eventListener,sender); } } - /// - /// Actual wire call for method. - /// + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling - /// of the response is completed. + /// A that will be complete when handling of the + /// response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroupWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesGetWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2093,7 +4693,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2126,7 +4726,7 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2136,7 +4736,7 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2155,7 +4755,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2177,16 +4777,19 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FlowProfilesGet_Validate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -2195,11 +4798,21 @@ public partial class DataTransfer await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(pipelineName),pipelineName); + await eventListener.AssertMinimumLength(nameof(pipelineName),pipelineName,3); + await eventListener.AssertMaximumLength(nameof(pipelineName),pipelineName,64); + await eventListener.AssertRegEx(nameof(pipelineName), pipelineName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(flowProfileName),flowProfileName); + await eventListener.AssertMinimumLength(nameof(flowProfileName),flowProfileName,3); + await eventListener.AssertMaximumLength(nameof(flowProfileName),flowProfileName,64); + await eventListener.AssertRegEx(nameof(flowProfileName), flowProfileName, @"^[a-zA-Z0-9-]{3,64}$"); } } - /// Gets connections in a subscription. + /// Lists all FlowProfiles under a given Pipeline. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2208,9 +4821,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesListByPipeline(string subscriptionId, string resourceGroupName, string pipelineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2218,7 +4831,11 @@ public partial class DataTransfer var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2232,11 +4849,11 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesListByPipeline_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connections in a subscription. + /// Lists all FlowProfiles under a given Pipeline. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2246,27 +4863,33 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesListByPipelineViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2280,39 +4903,45 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsListBySubscription_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesListByPipeline_Call (request, onOk,onDefault,eventListener,sender); } } - /// Gets connections in a subscription. + /// Lists all FlowProfiles under a given Pipeline. /// /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling + /// A that will be complete when handling /// of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesListByPipelineViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2326,21 +4955,23 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsListBySubscriptionWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesListByPipelineWithResult_Call (request, eventListener,sender); } } - /// Gets connections in a subscription. + /// Lists all FlowProfiles under a given Pipeline. /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling + /// A that will be complete when handling /// of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionWithResult(string subscriptionId, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesListByPipelineWithResult(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2348,7 +4979,11 @@ public partial class DataTransfer var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + global::System.Uri.EscapeDataString(subscriptionId) - + "/providers/Microsoft.AzureDataTransfer/connections" + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2362,21 +4997,21 @@ public partial class DataTransfer await eventListener.Signal(ADT.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsListBySubscriptionWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesListByPipelineWithResult_Call (request, eventListener,sender); } } /// - /// Actual wire call for method. + /// Actual wire call for method. /// /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling + /// A that will be complete when handling /// of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListBySubscriptionWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesListByPipelineWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2395,7 +5030,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfileListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2428,7 +5063,7 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2438,7 +5073,7 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesListByPipeline_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2457,7 +5092,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.ConnectionListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfileListResult.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -2479,28 +5114,39 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will - /// get validation events back. + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. /// /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the pipeline on which to operate. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsListBySubscription_Validate(string subscriptionId, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FlowProfilesListByPipeline_Validate(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(pipelineName),pipelineName); + await eventListener.AssertMinimumLength(nameof(pipelineName),pipelineName,3); + await eventListener.AssertMaximumLength(nameof(pipelineName),pipelineName,64); + await eventListener.AssertRegEx(nameof(pipelineName), pipelineName, @"^[a-zA-Z0-9-]{3,64}$"); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile patch definition containing the properties to update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2510,9 +5156,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesUpdate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfilePatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2522,8 +5168,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2541,13 +5189,13 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// - /// Connection body + /// The FlowProfile patch definition containing the properties to update. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2557,32 +5205,35 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IConnectionsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IFlowProfilePatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2600,46 +5251,49 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// - /// Connection body + /// The FlowProfile patch definition containing the properties to update. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IFlowProfilePatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { // verify that Identity format is an exact match for uri - var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/connections/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Microsoft.AzureDataTransfer/pipelines/(?[^/]+)/flowProfiles/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); if (!_match.Success) { - throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}'"); } // replace URI parameters with values from identity var subscriptionId = _match.Groups["subscriptionId"].Value; var resourceGroupName = _match.Groups["resourceGroupName"].Value; - var connectionName = _match.Groups["connectionName"].Value; + var pipelineName = _match.Groups["pipelineName"].Value; + var flowProfileName = _match.Groups["flowProfileName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" + subscriptionId + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.AzureDataTransfer/connections/" - + connectionName + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + pipelineName + + "/flowProfiles/" + + flowProfileName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2657,15 +5311,17 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesUpdateWithResult_Call (request, eventListener,sender); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsUpdate operation + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// Json string supplied to the FlowProfilesUpdate operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2674,9 +5330,9 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesUpdateViaJsonString(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2686,8 +5342,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2705,24 +5363,26 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } // make the call - await this.ConnectionsUpdate_Call (request, onOk,onDefault,eventListener,sender); + await this.FlowProfilesUpdate_Call (request, onOk,onDefault,eventListener,sender); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Json string supplied to the ConnectionsUpdate operation + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// Json string supplied to the FlowProfilesUpdate operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + public async global::System.Threading.Tasks.Task FlowProfilesUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2732,8 +5392,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2751,25 +5413,27 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesUpdateWithResult_Call (request, eventListener,sender); } } - /// update the connection resource. + /// Applies partial update to an existing FlowProfile resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile patch definition containing the properties to update. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - public async global::System.Threading.Tasks.Task ConnectionsUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) + public async global::System.Threading.Tasks.Task FlowProfilesUpdateWithResult(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfilePatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2779,8 +5443,10 @@ public partial class DataTransfer + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" + global::System.Uri.EscapeDataString(resourceGroupName) - + "/providers/Microsoft.AzureDataTransfer/connections/" - + global::System.Uri.EscapeDataString(connectionName) + + "/providers/Microsoft.AzureDataTransfer/pipelines/" + + global::System.Uri.EscapeDataString(pipelineName) + + "/flowProfiles/" + + global::System.Uri.EscapeDataString(flowProfileName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2798,19 +5464,19 @@ public partial class DataTransfer request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); await eventListener.Signal(ADT.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return null; } // make the call - return await this.ConnectionsUpdateWithResult_Call (request, eventListener,sender); + return await this.FlowProfilesUpdateWithResult_Call (request, eventListener,sender); } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// - /// A that will be complete when handling of the + /// A that will be complete when handling of the /// response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesUpdateWithResult_Call(global::System.Net.Http.HttpRequestMessage request, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -2922,7 +5588,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return null; } - var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); + var _result = _response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) ); return await _result; } default: @@ -2955,7 +5621,7 @@ public partial class DataTransfer } } - /// Actual wire call for method. + /// Actual wire call for method. /// the prepared HttpRequestMessage to send. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2965,7 +5631,7 @@ public partial class DataTransfer /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) + internal async global::System.Threading.Tasks.Task FlowProfilesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3077,7 +5743,7 @@ public partial class DataTransfer case global::System.Net.HttpStatusCode.OK: { await eventListener.Signal(ADT.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.Connection.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => ADT.Models.FlowProfile.FromJson(ADT.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: @@ -3099,18 +5765,20 @@ public partial class DataTransfer } /// - /// Validation method for method. Call this like the actual call, but you will get validation + /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the connection to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and + /// contain only alphanumeric characters or hyphens. + /// The FlowProfile patch definition containing the properties to update. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. /// - internal async global::System.Threading.Tasks.Task ConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string connectionName, ADT.Models.IConnectionsPatch body, ADT.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task FlowProfilesUpdate_Validate(string subscriptionId, string resourceGroupName, string pipelineName, string flowProfileName, ADT.Models.IFlowProfilePatch body, ADT.Runtime.IEventListener eventListener) { using( NoSynchronizationContext ) { @@ -3119,10 +5787,14 @@ public partial class DataTransfer await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); - await eventListener.AssertNotNull(nameof(connectionName),connectionName); - await eventListener.AssertMinimumLength(nameof(connectionName),connectionName,3); - await eventListener.AssertMaximumLength(nameof(connectionName),connectionName,64); - await eventListener.AssertRegEx(nameof(connectionName), connectionName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(pipelineName),pipelineName); + await eventListener.AssertMinimumLength(nameof(pipelineName),pipelineName,3); + await eventListener.AssertMaximumLength(nameof(pipelineName),pipelineName,64); + await eventListener.AssertRegEx(nameof(pipelineName), pipelineName, @"^[a-zA-Z0-9-]{3,64}$"); + await eventListener.AssertNotNull(nameof(flowProfileName),flowProfileName); + await eventListener.AssertMinimumLength(nameof(flowProfileName),flowProfileName,3); + await eventListener.AssertMaximumLength(nameof(flowProfileName),flowProfileName,64); + await eventListener.AssertRegEx(nameof(flowProfileName), flowProfileName, @"^[a-zA-Z0-9-]{3,64}$"); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } @@ -3145,7 +5817,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdate(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IFlow body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3194,7 +5866,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IFlow body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3254,7 +5926,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IFlow body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3318,7 +5990,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3367,7 +6039,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3417,7 +6089,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IFlow body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3797,7 +6469,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDelete(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3841,7 +6513,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4082,7 +6754,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDisable(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4126,7 +6798,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDisableViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4181,7 +6853,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDisableViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4239,7 +6911,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsDisableWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4614,7 +7286,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsEnable(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4658,7 +7330,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsEnableViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4713,7 +7385,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsEnableViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4771,7 +7443,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsEnableWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5146,7 +7818,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsGet(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5189,7 +7861,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5243,7 +7915,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsGetViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5300,7 +7972,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsGetWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5490,7 +8162,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLink(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5540,7 +8212,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLinkViaIdentity(global::System.String viaIdentity, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5601,7 +8273,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLinkViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5666,7 +8338,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLinkViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5716,7 +8388,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLinkViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5767,7 +8439,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsLinkWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6148,7 +8820,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsListByConnection(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6190,7 +8862,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsListByConnectionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6242,7 +8914,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsListByConnectionViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6296,7 +8968,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsListByConnectionWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6480,7 +9152,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdate(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IFlowsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6529,7 +9201,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdateViaIdentity(global::System.String viaIdentity, ADT.Models.IFlowsPatch body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6589,7 +9261,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdateViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IFlowsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6653,7 +9325,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6702,7 +9374,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6752,7 +9424,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task FlowsUpdateWithResult(string subscriptionId, string resourceGroupName, string connectionName, string flowName, ADT.Models.IFlowsPatch body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7132,7 +9804,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingConnectionsList(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7174,7 +9846,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingConnectionsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7226,7 +9898,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingConnectionsListViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7280,7 +9952,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingConnectionsListWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7463,7 +10135,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingFlowsList(string subscriptionId, string resourceGroupName, string connectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7505,7 +10177,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingFlowsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7557,7 +10229,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingFlowsListViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7611,7 +10283,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task ListPendingFlowsListWithResult(string subscriptionId, string resourceGroupName, string connectionName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7778,11 +10450,11 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to approve. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7794,7 +10466,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnection(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7828,9 +10500,9 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// - /// Connection body + /// The request body containing the connection to approve. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -7842,7 +10514,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnectionViaIdentity(global::System.String viaIdentity, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7888,9 +10560,9 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// - /// Connection body + /// The request body containing the connection to approve. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -7900,7 +10572,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnectionViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7946,10 +10618,10 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesApproveConnection operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -7961,7 +10633,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnectionViaJsonString(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7995,10 +10667,10 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesApproveConnection operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -8008,7 +10680,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnectionViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8042,11 +10714,11 @@ public partial class DataTransfer } } - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to approve. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -8056,7 +10728,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesApproveConnectionWithResult(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8394,8 +11066,8 @@ public partial class DataTransfer /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to approve. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. @@ -8418,11 +11090,11 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Action to execute + /// The name of the pipeline on which to operate. + /// The action to be executed on the Pipeline. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8434,7 +11106,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteAction(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8468,9 +11140,9 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// - /// Action to execute + /// The action to be executed on the Pipeline. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -8482,7 +11154,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteActionViaIdentity(global::System.String viaIdentity, ADT.Models.IAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8528,9 +11200,9 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// - /// Action to execute + /// The action to be executed on the Pipeline. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -8540,7 +11212,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteActionViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IAction body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8586,10 +11258,10 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesExecuteAction operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -8601,7 +11273,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteActionViaJsonString(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8635,10 +11307,10 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesExecuteAction operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -8648,7 +11320,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteActionViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8682,11 +11354,11 @@ public partial class DataTransfer } } - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Action to execute + /// The name of the pipeline on which to operate. + /// The action to be executed on the Pipeline. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -8696,7 +11368,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesExecuteActionWithResult(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IAction body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9032,8 +11704,8 @@ public partial class DataTransfer /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Action to execute + /// The name of the pipeline on which to operate. + /// The action to be executed on the Pipeline. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. @@ -9056,10 +11728,10 @@ public partial class DataTransfer } } - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -9070,7 +11742,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesGet(string subscriptionId, string resourceGroupName, string pipelineName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9099,7 +11771,7 @@ public partial class DataTransfer } } - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9111,7 +11783,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9152,7 +11824,7 @@ public partial class DataTransfer } } - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -9162,7 +11834,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesGetViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9203,10 +11875,10 @@ public partial class DataTransfer } } - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// @@ -9215,7 +11887,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesGetWithResult(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9360,7 +12032,7 @@ public partial class DataTransfer /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. @@ -9381,7 +12053,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a resource group. + /// Lists all Pipeline resources within the specified resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// a delegate that is called when the remote service returns 200 (OK). @@ -9394,7 +12066,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9422,7 +12094,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a resource group. + /// Lists all Pipeline resources within the specified resource group. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9434,7 +12106,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9473,7 +12145,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a resource group. + /// Lists all Pipeline resources within the specified resource group. /// /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -9483,7 +12155,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9522,7 +12194,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a resource group. + /// Lists all Pipeline resources within the specified resource group. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. /// an instance that will receive events. @@ -9533,7 +12205,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9695,7 +12367,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a subscription. + /// Lists all Pipeline resources within the current subscription. /// The ID of the target subscription. The value must be an UUID. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9707,7 +12379,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9733,7 +12405,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a subscription. + /// Lists all Pipeline resources within the current subscription. /// /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -9745,7 +12417,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9781,7 +12453,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a subscription. + /// Lists all Pipeline resources within the current subscription. /// /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -9791,7 +12463,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9827,7 +12499,7 @@ public partial class DataTransfer } } - /// Gets pipelines in a subscription. + /// Lists all Pipeline resources within the current subscription. /// The ID of the target subscription. The value must be an UUID. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -9837,7 +12509,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesListBySubscriptionWithResult(string subscriptionId, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9993,11 +12665,11 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to reject. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10009,7 +12681,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnection(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10043,9 +12715,9 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// - /// Connection body + /// The request body containing the connection to reject. /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -10057,7 +12729,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnectionViaIdentity(global::System.String viaIdentity, ADT.Models.IResourceBody body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10103,9 +12775,9 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// - /// Connection body + /// The request body containing the connection to reject. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -10115,7 +12787,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnectionViaIdentityWithResult(global::System.String viaIdentity, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10161,10 +12833,10 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesRejectConnection operation /// a delegate that is called when the remote service returns 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -10176,7 +12848,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnectionViaJsonString(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10210,10 +12882,10 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. /// Json string supplied to the PipelinesRejectConnection operation /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. @@ -10223,7 +12895,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnectionViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string pipelineName, global::System.String jsonString, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10257,11 +12929,11 @@ public partial class DataTransfer } } - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to reject. /// an instance that will receive events. /// an instance of an ADT.Runtime.ISendAsync pipeline to use to make the request. /// Allows the caller to choose the depth of the serialization. See . @@ -10271,7 +12943,7 @@ public partial class DataTransfer /// public async global::System.Threading.Tasks.Task PipelinesRejectConnectionWithResult(string subscriptionId, string resourceGroupName, string pipelineName, ADT.Models.IResourceBody body, ADT.Runtime.IEventListener eventListener, ADT.Runtime.ISendAsync sender, ADT.Runtime.SerializationMode serializationMode = ADT.Runtime.SerializationMode.IncludeCreate|ADT.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2025-05-21"; + var apiVersion = @"2025-05-30-preview"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10609,8 +13281,8 @@ public partial class DataTransfer /// /// The ID of the target subscription. The value must be an UUID. /// The name of the resource group. The name is case insensitive. - /// The name for the pipeline to perform the operation on. - /// Connection body + /// The name of the pipeline on which to operate. + /// The request body containing the connection to reject. /// an instance that will receive events. /// /// A that will be complete when handling of the response is completed. diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.PowerShell.cs new file mode 100644 index 000000000000..2a837e162578 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + /// + [System.ComponentModel.TypeConverter(typeof(AntivirusRulesetTypeConverter))] + public partial class AntivirusRuleset + { + + /// + /// 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 AntivirusRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AvSolution")) + { + ((ADT.Models.IAntivirusRulesetInternal)this).AvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AvSolution",((ADT.Models.IAntivirusRulesetInternal)this).AvSolution, __y => TypeConverterExtensions.SelectToList(__y, 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 AntivirusRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AvSolution")) + { + ((ADT.Models.IAntivirusRulesetInternal)this).AvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AvSolution",((ADT.Models.IAntivirusRulesetInternal)this).AvSolution, __y => TypeConverterExtensions.SelectToList(__y, 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 ADT.Models.IAntivirusRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AntivirusRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IAntivirusRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AntivirusRuleset(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 ADT.Models.IAntivirusRuleset FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + [System.ComponentModel.TypeConverter(typeof(AntivirusRulesetTypeConverter))] + public partial interface IAntivirusRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.TypeConverter.cs similarity index 82% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.TypeConverter.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.TypeConverter.cs index 16c6194d6f43..3e4bbc94c223 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.TypeConverter.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.TypeConverter.cs @@ -8,9 +8,9 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ReadOperationStatusPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class AntivirusRulesetTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ReadOperationStatusPropertiesTypeConverter : global::System public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,31 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static ADT.Models.IReadOperationStatusProperties ConvertFrom(dynamic sourceValue) + public static ADT.Models.IAntivirusRuleset ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(ADT.Models.IReadOperationStatusProperties).IsAssignableFrom(type)) + if (typeof(ADT.Models.IAntivirusRuleset).IsAssignableFrom(type)) { return sourceValue; } try { - return ReadOperationStatusProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return AntivirusRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static ADT.Models.IReadOperationStatusProperties ConvertFrom(dynamic sour } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ReadOperationStatusProperties.DeserializeFromPSObject(sourceValue); + return AntivirusRuleset.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ReadOperationStatusProperties.DeserializeFromDictionary(sourceValue); + return AntivirusRuleset.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.cs new file mode 100644 index 000000000000..1f4157679f5c --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.cs @@ -0,0 +1,64 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + /// + public partial class AntivirusRuleset : + ADT.Models.IAntivirusRuleset, + ADT.Models.IAntivirusRulesetInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _avSolution; + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List AvSolution { get => this._avSolution; set => this._avSolution = value; } + + /// Creates an new instance. + public AntivirusRuleset() + { + + } + } + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + public partial interface IAntivirusRuleset : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AvSolution { get; set; } + + } + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + internal partial interface IAntivirusRulesetInternal + + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AvSolution { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.json.cs new file mode 100644 index 000000000000..61417a3d69a0 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/AntivirusRuleset.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Antivirus scanning rules for replicating data. By default, all antivirus scanning solutions are disabled. + /// + public partial class AntivirusRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal AntivirusRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_avSolution = If( json?.PropertyT("avSolutions"), out var __jsonAvSolutions) ? If( __jsonAvSolutions as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is ADT.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _avSolution;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IAntivirusRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IAntivirusRuleset. + public static ADT.Models.IAntivirusRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new AntivirusRuleset(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._avSolution) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._avSolution ) + { + AddIf(null != (((object)__x)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("avSolutions",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.PowerShell.cs index c1db6f5c3d94..c1cced08c8d4 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.PowerShell.cs @@ -76,6 +76,10 @@ internal ApiFlowOptions(global::System.Collections.IDictionary content) return; } // actually deserialize + if (content.Contains("RemoteEndpointSetting")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("RemoteEndpointSetting",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("RemoteEndpoint")) { ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpoint = (string) content.GetValueForProperty("RemoteEndpoint",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpoint, global::System.Convert.ToString); @@ -104,6 +108,18 @@ internal ApiFlowOptions(global::System.Collections.IDictionary content) { ((ADT.Models.IApiFlowOptionsInternal)this).AudienceOverride = (string) content.GetValueForProperty("AudienceOverride",((ADT.Models.IApiFlowOptionsInternal)this).AudienceOverride, global::System.Convert.ToString); } + if (content.Contains("Authentication")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).Authentication = (System.Collections.Generic.List) content.GetValueForProperty("Authentication",((ADT.Models.IApiFlowOptionsInternal)this).Authentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -121,6 +137,10 @@ internal ApiFlowOptions(global::System.Management.Automation.PSObject content) return; } // actually deserialize + if (content.Contains("RemoteEndpointSetting")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("RemoteEndpointSetting",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("RemoteEndpoint")) { ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpoint = (string) content.GetValueForProperty("RemoteEndpoint",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpoint, global::System.Convert.ToString); @@ -149,6 +169,18 @@ internal ApiFlowOptions(global::System.Management.Automation.PSObject content) { ((ADT.Models.IApiFlowOptionsInternal)this).AudienceOverride = (string) content.GetValueForProperty("AudienceOverride",((ADT.Models.IApiFlowOptionsInternal)this).AudienceOverride, global::System.Convert.ToString); } + if (content.Contains("Authentication")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).Authentication = (System.Collections.Generic.List) content.GetValueForProperty("Authentication",((ADT.Models.IApiFlowOptionsInternal)this).Authentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IApiFlowOptionsInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.cs index a505df34002d..16533a7a9afc 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.cs @@ -13,6 +13,9 @@ public partial class ApiFlowOptions : ADT.Models.IApiFlowOptionsInternal { + /// Internal Acessors for RemoteEndpointSetting + ADT.Models.IRemoteEndpointSettings ADT.Models.IApiFlowOptionsInternal.RemoteEndpointSetting { get => (this._remoteEndpointSetting = this._remoteEndpointSetting ?? new ADT.Models.RemoteEndpointSettings()); set { {_remoteEndpointSetting = value;} } } + /// Backing field for property. private string _apiMode; @@ -25,10 +28,23 @@ public partial class ApiFlowOptions : /// Backing field for property. private string _audienceOverride; - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string AudienceOverride { get => this._audienceOverride; set => this._audienceOverride = value; } + /// Backing field for property. + private System.Collections.Generic.List _authentication; + + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Authentication { get => this._authentication; set => this._authentication = value; } + /// Backing field for property. private string _cname; @@ -39,28 +55,58 @@ public partial class ApiFlowOptions : /// Backing field for property. private string _identityTranslation; - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string IdentityTranslation { get => this._identityTranslation; set => this._identityTranslation = value; } /// Backing field for property. private string _remoteCallingModeClientId; - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string RemoteCallingModeClientId { get => this._remoteCallingModeClientId; set => this._remoteCallingModeClientId = value; } /// Backing field for property. private string _remoteEndpoint; - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string RemoteEndpoint { get => this._remoteEndpoint; set => this._remoteEndpoint = value; } + /// Backing field for property. + private ADT.Models.IRemoteEndpointSettings _remoteEndpointSetting; + + /// Defines the destination remote endpoint for the API calls. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IRemoteEndpointSettings RemoteEndpointSetting { get => (this._remoteEndpointSetting = this._remoteEndpointSetting ?? new ADT.Models.RemoteEndpointSettings()); set => this._remoteEndpointSetting = value; } + + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List RemoteEndpointSettingAuthentication { get => ((ADT.Models.IRemoteEndpointSettingsInternal)RemoteEndpointSetting).Authentication; set => ((ADT.Models.IRemoteEndpointSettingsInternal)RemoteEndpointSetting).Authentication = value ?? null /* arrayOf */; } + + /// The remote endpoint uri all API calls. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string RemoteEndpointSettingEndpoint { get => ((ADT.Models.IRemoteEndpointSettingsInternal)RemoteEndpointSetting).Endpoint; set => ((ADT.Models.IRemoteEndpointSettingsInternal)RemoteEndpointSetting).Endpoint = value ?? null; } + /// Backing field for property. private string _senderClientId; - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string SenderClientId { get => this._senderClientId; set => this._senderClientId = value; } @@ -88,17 +134,34 @@ public partial interface IApiFlowOptions : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Optional field to override the audience of the remote endpoint", + Description = @"Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"audienceOverride", PossibleTypes = new [] { typeof(string) })] string AudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List Authentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Runtime.Info( Required = false, @@ -110,48 +173,85 @@ public partial interface IApiFlowOptions : SerializedName = @"cname", PossibleTypes = new [] { typeof(string) })] string Cname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Flag for if Azure Data Transfer API Flow should extract the user token", + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"identityTranslation", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string IdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote stub app registration Client ID", + Description = @"Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"remoteCallingModeClientId", PossibleTypes = new [] { typeof(string) })] string RemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote host to which communication needs to be made", + Description = @"Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.", SerializedName = @"remoteEndpoint", PossibleTypes = new [] { typeof(string) })] string RemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Sender's app user assigned Manage Identity client ID", + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string RemoteEndpointSettingEndpoint { get; set; } + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"senderClientId", PossibleTypes = new [] { typeof(string) })] string SenderClientId { get; set; } @@ -166,18 +266,47 @@ internal partial interface IApiFlowOptionsInternal /// [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// string AudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List Authentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance string Cname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string IdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string RemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// string RemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// Defines the destination remote endpoint for the API calls. + ADT.Models.IRemoteEndpointSettings RemoteEndpointSetting { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + string RemoteEndpointSettingEndpoint { get; set; } + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string SenderClientId { get; set; } } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.json.cs index c3b1518eb7b4..1557026a5f98 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ApiFlowOptions.json.cs @@ -65,6 +65,7 @@ internal ApiFlowOptions(ADT.Runtime.Json.JsonObject json) { return; } + {_remoteEndpointSetting = If( json?.PropertyT("remoteEndpointSettings"), out var __jsonRemoteEndpointSettings) ? ADT.Models.RemoteEndpointSettings.FromJson(__jsonRemoteEndpointSettings) : _remoteEndpointSetting;} {_remoteEndpoint = If( json?.PropertyT("remoteEndpoint"), out var __jsonRemoteEndpoint) ? (string)__jsonRemoteEndpoint : (string)_remoteEndpoint;} {_cname = If( json?.PropertyT("cname"), out var __jsonCname) ? (string)__jsonCname : (string)_cname;} {_apiMode = If( json?.PropertyT("apiMode"), out var __jsonApiMode) ? (string)__jsonApiMode : (string)_apiMode;} @@ -72,6 +73,7 @@ internal ApiFlowOptions(ADT.Runtime.Json.JsonObject json) {_senderClientId = If( json?.PropertyT("senderClientId"), out var __jsonSenderClientId) ? (string)__jsonSenderClientId : (string)_senderClientId;} {_remoteCallingModeClientId = If( json?.PropertyT("remoteCallingModeClientId"), out var __jsonRemoteCallingModeClientId) ? (string)__jsonRemoteCallingModeClientId : (string)_remoteCallingModeClientId;} {_audienceOverride = If( json?.PropertyT("audienceOverride"), out var __jsonAudienceOverride) ? (string)__jsonAudienceOverride : (string)_audienceOverride;} + {_authentication = If( json?.PropertyT("authentication"), out var __jsonAuthentication) ? If( __jsonAuthentication as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(ADT.Models.IAuthentication) (ADT.Models.Authentication.FromJson(__u) )) ))() : null : _authentication;} AfterFromJson(json); } @@ -104,6 +106,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A { return container; } + AddIf( null != this._remoteEndpointSetting ? (ADT.Runtime.Json.JsonNode) this._remoteEndpointSetting.ToJson(null,serializationMode) : null, "remoteEndpointSettings" ,container.Add ); AddIf( null != (((object)this._remoteEndpoint)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._remoteEndpoint.ToString()) : null, "remoteEndpoint" ,container.Add ); AddIf( null != (((object)this._cname)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._cname.ToString()) : null, "cname" ,container.Add ); AddIf( null != (((object)this._apiMode)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._apiMode.ToString()) : null, "apiMode" ,container.Add ); @@ -111,6 +114,15 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._senderClientId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._senderClientId.ToString()) : null, "senderClientId" ,container.Add ); AddIf( null != (((object)this._remoteCallingModeClientId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._remoteCallingModeClientId.ToString()) : null, "remoteCallingModeClientId" ,container.Add ); AddIf( null != (((object)this._audienceOverride)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._audienceOverride.ToString()) : null, "audienceOverride" ,container.Add ); + if (null != this._authentication) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._authentication ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("authentication",__w); + } AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.PowerShell.cs new file mode 100644 index 000000000000..0599ba85b7be --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + /// + [System.ComponentModel.TypeConverter(typeof(ArchiveRulesetTypeConverter))] + public partial class ArchiveRuleset + { + + /// + /// 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 ArchiveRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MinimumSizeForExpansion")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MinimumSizeForExpansion = (long?) content.GetValueForProperty("MinimumSizeForExpansion",((ADT.Models.IArchiveRulesetInternal)this).MinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumExpansionSizeLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumExpansionSizeLimit = (long?) content.GetValueForProperty("MaximumExpansionSizeLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumDepthLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumDepthLimit = (long?) content.GetValueForProperty("MaximumDepthLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumCompressionRatioLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumCompressionRatioLimit = (double?) content.GetValueForProperty("MaximumCompressionRatioLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ArchiveRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MinimumSizeForExpansion")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MinimumSizeForExpansion = (long?) content.GetValueForProperty("MinimumSizeForExpansion",((ADT.Models.IArchiveRulesetInternal)this).MinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumExpansionSizeLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumExpansionSizeLimit = (long?) content.GetValueForProperty("MaximumExpansionSizeLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumDepthLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumDepthLimit = (long?) content.GetValueForProperty("MaximumDepthLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MaximumCompressionRatioLimit")) + { + ((ADT.Models.IArchiveRulesetInternal)this).MaximumCompressionRatioLimit = (double?) content.GetValueForProperty("MaximumCompressionRatioLimit",((ADT.Models.IArchiveRulesetInternal)this).MaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// an instance of . + public static ADT.Models.IArchiveRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ArchiveRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IArchiveRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ArchiveRuleset(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 ADT.Models.IArchiveRuleset FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + [System.ComponentModel.TypeConverter(typeof(ArchiveRulesetTypeConverter))] + public partial interface IArchiveRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.TypeConverter.cs similarity index 82% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.TypeConverter.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.TypeConverter.cs index ddd9e458b733..e28332ce9932 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.TypeConverter.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.TypeConverter.cs @@ -8,9 +8,9 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ReadInternalMetadataPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ArchiveRulesetTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ReadInternalMetadataPropertiesTypeConverter : global::Syste public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,32 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static ADT.Models.IReadInternalMetadataProperties ConvertFrom(dynamic sourceValue) + public static ADT.Models.IArchiveRuleset ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(ADT.Models.IReadInternalMetadataProperties).IsAssignableFrom(type)) + if (typeof(ADT.Models.IArchiveRuleset).IsAssignableFrom(type)) { return sourceValue; } try { - return ReadInternalMetadataProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ArchiveRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -128,11 +127,11 @@ public static ADT.Models.IReadInternalMetadataProperties ConvertFrom(dynamic sou } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ReadInternalMetadataProperties.DeserializeFromPSObject(sourceValue); + return ArchiveRuleset.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ReadInternalMetadataProperties.DeserializeFromDictionary(sourceValue); + return ArchiveRuleset.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.cs new file mode 100644 index 000000000000..d188bb75c20d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.cs @@ -0,0 +1,170 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + /// + public partial class ArchiveRuleset : + ADT.Models.IArchiveRuleset, + ADT.Models.IArchiveRulesetInternal + { + + /// Backing field for property. + private double? _maximumCompressionRatioLimit; + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public double? MaximumCompressionRatioLimit { get => this._maximumCompressionRatioLimit; set => this._maximumCompressionRatioLimit = value; } + + /// Backing field for property. + private long? _maximumDepthLimit; + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public long? MaximumDepthLimit { get => this._maximumDepthLimit; set => this._maximumDepthLimit = value; } + + /// Backing field for property. + private long? _maximumExpansionSizeLimit; + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public long? MaximumExpansionSizeLimit { get => this._maximumExpansionSizeLimit; set => this._maximumExpansionSizeLimit = value; } + + /// Backing field for property. + private long? _minimumSizeForExpansion; + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public long? MinimumSizeForExpansion { get => this._minimumSizeForExpansion; set => this._minimumSizeForExpansion = value; } + + /// Creates an new instance. + public ArchiveRuleset() + { + + } + } + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + public partial interface IArchiveRuleset : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? MaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? MaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? MaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? MinimumSizeForExpansion { get; set; } + + } + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + internal partial interface IArchiveRulesetInternal + + { + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? MaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? MaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? MaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? MinimumSizeForExpansion { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.json.cs new file mode 100644 index 000000000000..2e9e6cd8d359 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ArchiveRuleset.json.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Rules for regulating supported archive files (BZip2, Cpio, Deb, GZip, Rpm, Tar, Zip) during data replication. All properties + /// are optional and only the configured options will be applied against archives. As an example, suppose minimumSizeForExpansion + /// is 10 MiB and maximumExpansionSizeLimit is 1 GiB. Then all archives smaller than 10 MiB will be treated as though the + /// archive ruleset is disabled, although other rulesets will apply as usual. Furthermore, all archives at least 10 MiB in + /// size but with a decompressed size greater than 1 GiB will fail the ruleset. All other archives will have their contents + /// extracted and each extracted element will be applied to all rulesets. + /// + public partial class ArchiveRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal ArchiveRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_minimumSizeForExpansion = If( json?.PropertyT("minimumSizeForExpansion"), out var __jsonMinimumSizeForExpansion) ? (long?)__jsonMinimumSizeForExpansion : _minimumSizeForExpansion;} + {_maximumExpansionSizeLimit = If( json?.PropertyT("maximumExpansionSizeLimit"), out var __jsonMaximumExpansionSizeLimit) ? (long?)__jsonMaximumExpansionSizeLimit : _maximumExpansionSizeLimit;} + {_maximumDepthLimit = If( json?.PropertyT("maximumDepthLimit"), out var __jsonMaximumDepthLimit) ? (long?)__jsonMaximumDepthLimit : _maximumDepthLimit;} + {_maximumCompressionRatioLimit = If( json?.PropertyT("maximumCompressionRatioLimit"), out var __jsonMaximumCompressionRatioLimit) ? (double?)__jsonMaximumCompressionRatioLimit : _maximumCompressionRatioLimit;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IArchiveRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IArchiveRuleset. + public static ADT.Models.IArchiveRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new ArchiveRuleset(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._minimumSizeForExpansion ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((long)this._minimumSizeForExpansion) : null, "minimumSizeForExpansion" ,container.Add ); + AddIf( null != this._maximumExpansionSizeLimit ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((long)this._maximumExpansionSizeLimit) : null, "maximumExpansionSizeLimit" ,container.Add ); + AddIf( null != this._maximumDepthLimit ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((long)this._maximumDepthLimit) : null, "maximumDepthLimit" ,container.Add ); + AddIf( null != this._maximumCompressionRatioLimit ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((double)this._maximumCompressionRatioLimit) : null, "maximumCompressionRatioLimit" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.PowerShell.cs new file mode 100644 index 000000000000..7210192c9020 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.PowerShell.cs @@ -0,0 +1,218 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + /// + [System.ComponentModel.TypeConverter(typeof(AuthenticationTypeConverter))] + public partial class Authentication + { + + /// + /// 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 Authentication(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((ADT.Models.IAuthenticationInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IAuthenticationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Instance")) + { + ((ADT.Models.IAuthenticationInternal)this).Instance = (string) content.GetValueForProperty("Instance",((ADT.Models.IAuthenticationInternal)this).Instance, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((ADT.Models.IAuthenticationInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((ADT.Models.IAuthenticationInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Authority")) + { + ((ADT.Models.IAuthenticationInternal)this).Authority = (string) content.GetValueForProperty("Authority",((ADT.Models.IAuthenticationInternal)this).Authority, global::System.Convert.ToString); + } + if (content.Contains("ApplicationId")) + { + ((ADT.Models.IAuthenticationInternal)this).ApplicationId = (System.Collections.Generic.List) content.GetValueForProperty("ApplicationId",((ADT.Models.IAuthenticationInternal)this).ApplicationId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Audience")) + { + ((ADT.Models.IAuthenticationInternal)this).Audience = (string) content.GetValueForProperty("Audience",((ADT.Models.IAuthenticationInternal)this).Audience, global::System.Convert.ToString); + } + if (content.Contains("ClientIdOverride")) + { + ((ADT.Models.IAuthenticationInternal)this).ClientIdOverride = (string) content.GetValueForProperty("ClientIdOverride",((ADT.Models.IAuthenticationInternal)this).ClientIdOverride, global::System.Convert.ToString); + } + if (content.Contains("IdentityTranslation")) + { + ((ADT.Models.IAuthenticationInternal)this).IdentityTranslation = (string) content.GetValueForProperty("IdentityTranslation",((ADT.Models.IAuthenticationInternal)this).IdentityTranslation, 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 Authentication(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((ADT.Models.IAuthenticationInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IAuthenticationInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Instance")) + { + ((ADT.Models.IAuthenticationInternal)this).Instance = (string) content.GetValueForProperty("Instance",((ADT.Models.IAuthenticationInternal)this).Instance, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((ADT.Models.IAuthenticationInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((ADT.Models.IAuthenticationInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Authority")) + { + ((ADT.Models.IAuthenticationInternal)this).Authority = (string) content.GetValueForProperty("Authority",((ADT.Models.IAuthenticationInternal)this).Authority, global::System.Convert.ToString); + } + if (content.Contains("ApplicationId")) + { + ((ADT.Models.IAuthenticationInternal)this).ApplicationId = (System.Collections.Generic.List) content.GetValueForProperty("ApplicationId",((ADT.Models.IAuthenticationInternal)this).ApplicationId, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("Audience")) + { + ((ADT.Models.IAuthenticationInternal)this).Audience = (string) content.GetValueForProperty("Audience",((ADT.Models.IAuthenticationInternal)this).Audience, global::System.Convert.ToString); + } + if (content.Contains("ClientIdOverride")) + { + ((ADT.Models.IAuthenticationInternal)this).ClientIdOverride = (string) content.GetValueForProperty("ClientIdOverride",((ADT.Models.IAuthenticationInternal)this).ClientIdOverride, global::System.Convert.ToString); + } + if (content.Contains("IdentityTranslation")) + { + ((ADT.Models.IAuthenticationInternal)this).IdentityTranslation = (string) content.GetValueForProperty("IdentityTranslation",((ADT.Models.IAuthenticationInternal)this).IdentityTranslation, 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 ADT.Models.IAuthentication DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Authentication(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IAuthentication DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Authentication(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 ADT.Models.IAuthentication FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + [System.ComponentModel.TypeConverter(typeof(AuthenticationTypeConverter))] + public partial interface IAuthentication + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.TypeConverter.cs similarity index 81% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.TypeConverter.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.TypeConverter.cs index 3665e8016053..a60996b31eff 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.TypeConverter.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.TypeConverter.cs @@ -8,9 +8,9 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of + /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ReadPipelineConnectionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class AuthenticationTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ReadPipelineConnectionPropertiesTypeConverter : global::Sys public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); /// - /// Determines if the converter can convert the parameter to the + /// Determines if the converter can convert the parameter to the /// type. /// - /// the instance to check if it can be converted to the the instance to check if it can be converted to the type. /// - /// true if the instance could be converted to a type, otherwise false + /// true if the instance could be converted to a type, otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) { @@ -95,32 +95,31 @@ public static bool CanConvertFrom(dynamic sourceValue) /// 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. + /// 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 + /// Converts the parameter into an instance of /// - /// the value to convert into an instance of . + /// the value to convert into an instance of . /// - /// an instance of , or null if there is no suitable conversion. + /// an instance of , or null if there is no suitable conversion. /// - public static ADT.Models.IReadPipelineConnectionProperties ConvertFrom(dynamic sourceValue) + public static ADT.Models.IAuthentication ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(ADT.Models.IReadPipelineConnectionProperties).IsAssignableFrom(type)) + if (typeof(ADT.Models.IAuthentication).IsAssignableFrom(type)) { return sourceValue; } try { - return ReadPipelineConnectionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return Authentication.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -128,11 +127,11 @@ public static ADT.Models.IReadPipelineConnectionProperties ConvertFrom(dynamic s } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ReadPipelineConnectionProperties.DeserializeFromPSObject(sourceValue); + return Authentication.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ReadPipelineConnectionProperties.DeserializeFromDictionary(sourceValue); + return Authentication.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.cs new file mode 100644 index 000000000000..ba4517037cd9 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.cs @@ -0,0 +1,245 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + /// + public partial class Authentication : + ADT.Models.IAuthentication, + ADT.Models.IAuthenticationInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _applicationId; + + /// + /// List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List ApplicationId { get => this._applicationId; set => this._applicationId = value; } + + /// Backing field for property. + private string _audience; + + /// + /// Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a + /// value is not provided. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Audience { get => this._audience; set => this._audience = value; } + + /// Backing field for property. + private string _authority; + + /// + /// The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication + /// context. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Authority { get => this._authority; set => this._authority = value; } + + /// Backing field for property. + private string _clientIdOverride; + + /// + /// The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. + /// This field specifies the user provided app's clientId. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ClientIdOverride { get => this._clientIdOverride; set => this._clientIdOverride = value; } + + /// Backing field for property. + private string _identityTranslation; + + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string IdentityTranslation { get => this._identityTranslation; set => this._identityTranslation = value; } + + /// Backing field for property. + private string _instance; + + /// The identity provider's token service instance. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Instance { get => this._instance; set => this._instance = value; } + + /// Backing field for property. + private string _tenantId; + + /// + /// A unique identifier representing the tenant of the identity provider's token service. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string TenantId { get => this._tenantId; set => this._tenantId = value; } + + /// Backing field for property. + private string _type; + + /// Type of authentication mechanism. JWT by default. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public Authentication() + { + + } + } + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + public partial interface IAuthentication : + ADT.Runtime.IJsonSerializable + { + /// + /// List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check.", + SerializedName = @"applicationIds", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List ApplicationId { get; set; } + /// + /// Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a + /// value is not provided. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a value is not provided.", + SerializedName = @"audience", + PossibleTypes = new [] { typeof(string) })] + string Audience { get; set; } + /// + /// The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication + /// context. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication context.", + SerializedName = @"authority", + PossibleTypes = new [] { typeof(string) })] + string Authority { get; set; } + /// + /// The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. + /// This field specifies the user provided app's clientId. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. This field specifies the user provided app's clientId.", + SerializedName = @"clientIdOverride", + PossibleTypes = new [] { typeof(string) })] + string ClientIdOverride { get; set; } + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow.", + SerializedName = @"identityTranslation", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] + string IdentityTranslation { get; set; } + /// The identity provider's token service instance. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The identity provider's token service instance.", + SerializedName = @"instance", + PossibleTypes = new [] { typeof(string) })] + string Instance { get; set; } + /// + /// A unique identifier representing the tenant of the identity provider's token service. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A unique identifier representing the tenant of the identity provider's token service.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; set; } + /// Type of authentication mechanism. JWT by default. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Type of authentication mechanism. JWT by default.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("JWT", "None")] + string Type { get; set; } + + } + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + internal partial interface IAuthenticationInternal + + { + /// + /// List of applicationIds allowed to authorize to this flow. This is used as an alternative to the RBAC authorization check. + /// + System.Collections.Generic.List ApplicationId { get; set; } + /// + /// Audience of the identity of the remote endpoint service. By default, remoteEndpointSettings.endpoint will be used if a + /// value is not provided. + /// + string Audience { get; set; } + /// + /// The full URL endpoint used to acquire tokens, typically combining the instance and tenant ID to target a specific authentication + /// context. + /// + string Authority { get; set; } + /// + /// The Flow can use an Entra app identity that is provided by the Flow user to obtain the token to call the remote endpoint. + /// This field specifies the user provided app's clientId. + /// + string ClientIdOverride { get; set; } + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. + /// + [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] + string IdentityTranslation { get; set; } + /// The identity provider's token service instance. + string Instance { get; set; } + /// + /// A unique identifier representing the tenant of the identity provider's token service. + /// + string TenantId { get; set; } + /// Type of authentication mechanism. JWT by default. + [global::ADT.PSArgumentCompleterAttribute("JWT", "None")] + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.json.cs new file mode 100644 index 000000000000..1fb7a0d3b687 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Authentication.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Configures the authentication method and parameters for an Azure Data Transfer API Flow. + /// + public partial class Authentication + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal Authentication(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_instance = If( json?.PropertyT("instance"), out var __jsonInstance) ? (string)__jsonInstance : (string)_instance;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_authority = If( json?.PropertyT("authority"), out var __jsonAuthority) ? (string)__jsonAuthority : (string)_authority;} + {_applicationId = If( json?.PropertyT("applicationIds"), out var __jsonApplicationIds) ? If( __jsonApplicationIds as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is ADT.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _applicationId;} + {_audience = If( json?.PropertyT("audience"), out var __jsonAudience) ? (string)__jsonAudience : (string)_audience;} + {_clientIdOverride = If( json?.PropertyT("clientIdOverride"), out var __jsonClientIdOverride) ? (string)__jsonClientIdOverride : (string)_clientIdOverride;} + {_identityTranslation = If( json?.PropertyT("identityTranslation"), out var __jsonIdentityTranslation) ? (string)__jsonIdentityTranslation : (string)_identityTranslation;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IAuthentication. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IAuthentication. + public static ADT.Models.IAuthentication FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new Authentication(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != (((object)this._instance)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._instance.ToString()) : null, "instance" ,container.Add ); + AddIf( null != (((object)this._tenantId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); + AddIf( null != (((object)this._authority)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._authority.ToString()) : null, "authority" ,container.Add ); + if (null != this._applicationId) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._applicationId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("applicationIds",__w); + } + AddIf( null != (((object)this._audience)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._audience.ToString()) : null, "audience" ,container.Add ); + AddIf( null != (((object)this._clientIdOverride)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._clientIdOverride.ToString()) : null, "clientIdOverride" ,container.Add ); + AddIf( null != (((object)this._identityTranslation)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._identityTranslation.ToString()) : null, "identityTranslation" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.PowerShell.cs index 3793e08a5a58..4f0d2ad83a98 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.PowerShell.cs @@ -172,6 +172,10 @@ internal Connection(global::System.Collections.IDictionary content) { ((ADT.Models.IConnectionInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IConnectionInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IConnectionInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IConnectionInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IConnectionInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IConnectionInternal)this).RequirementId, global::System.Convert.ToString); @@ -212,6 +216,10 @@ internal Connection(global::System.Collections.IDictionary content) { ((ADT.Models.IConnectionInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IConnectionInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IConnectionInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IConnectionInternal)this).ApiHostname, global::System.Convert.ToString); + } if (content.Contains("IdentityPrincipalId")) { ((ADT.Models.IConnectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IConnectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); @@ -341,6 +349,10 @@ internal Connection(global::System.Management.Automation.PSObject content) { ((ADT.Models.IConnectionInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IConnectionInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IConnectionInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IConnectionInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IConnectionInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IConnectionInternal)this).RequirementId, global::System.Convert.ToString); @@ -381,6 +393,10 @@ internal Connection(global::System.Management.Automation.PSObject content) { ((ADT.Models.IConnectionInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IConnectionInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IConnectionInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IConnectionInternal)this).ApiHostname, global::System.Convert.ToString); + } if (content.Contains("IdentityPrincipalId")) { ((ADT.Models.IConnectionInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IConnectionInternal)this).IdentityPrincipalId, global::System.Convert.ToString); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.cs index cba64c9b7b71..09357464be01 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Connection.cs @@ -82,6 +82,10 @@ public partial class Connection : /// Internal Acessors for Type string ADT.Models.IResourceInternal.Type { get => ((ADT.Models.IResourceInternal)__trackedResource).Type; set => ((ADT.Models.IResourceInternal)__trackedResource).Type = value ?? null; } + /// Hostname specific to API Flows + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ApiHostname { get => ((ADT.Models.IConnectionPropertiesInternal)Property).ApiHostname; set => ((ADT.Models.IConnectionPropertiesInternal)Property).ApiHostname = value ?? null; } + /// Approver of this connection request [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string Approver { get => ((ADT.Models.IConnectionPropertiesInternal)Property).Approver; } @@ -94,7 +98,14 @@ public partial class Connection : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string Direction { get => ((ADT.Models.IConnectionPropertiesInternal)Property).Direction; set => ((ADT.Models.IConnectionPropertiesInternal)Property).Direction = value ?? null; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List FlowProfileList { get => ((ADT.Models.IConnectionPropertiesInternal)Property).FlowProfileList; set => ((ADT.Models.IConnectionPropertiesInternal)Property).FlowProfileList = value ?? null /* arrayOf */; } + + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List FlowType { get => ((ADT.Models.IConnectionPropertiesInternal)Property).FlowType; set => ((ADT.Models.IConnectionPropertiesInternal)Property).FlowType = value ?? null /* arrayOf */; } @@ -169,7 +180,10 @@ public partial class Connection : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string Pipeline { get => ((ADT.Models.IConnectionPropertiesInternal)Property).Pipeline; set => ((ADT.Models.IConnectionPropertiesInternal)Property).Pipeline = value ?? null; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List Policy { get => ((ADT.Models.IConnectionPropertiesInternal)Property).Policy; set => ((ADT.Models.IConnectionPropertiesInternal)Property).Policy = value ?? null /* arrayOf */; } @@ -200,11 +214,17 @@ public partial class Connection : [ADT.Origin(ADT.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); } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List Schema { get => ((ADT.Models.IConnectionPropertiesInternal)Property).Schema; set => ((ADT.Models.IConnectionPropertiesInternal)Property).Schema = value ?? null /* arrayOf */; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List SchemaUri { get => ((ADT.Models.IConnectionPropertiesInternal)Property).SchemaUri; set => ((ADT.Models.IConnectionPropertiesInternal)Property).SchemaUri = value ?? null /* arrayOf */; } @@ -283,6 +303,17 @@ public partial interface IConnection : ADT.Runtime.IJsonSerializable, ADT.Models.ITrackedResource { + /// Hostname specific to API Flows + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Hostname specific to API Flows", + SerializedName = @"apiHostname", + PossibleTypes = new [] { typeof(string) })] + string ApiHostname { get; set; } /// Approver of this connection request [ADT.Runtime.Info( Required = false, @@ -317,14 +348,28 @@ public partial interface IConnection : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types being requested for this connection", + Description = @"Provides a list of FlowProfiles .", + SerializedName = @"flowProfileList", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfileMetadata) })] + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The flow types being requested for this connection. This FlowType property has reached end of life support starting version 2025-05-30-preview. Please create a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -339,7 +384,7 @@ public partial interface IConnection : Description = @"Force disablement status of the current connection", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. @@ -452,14 +497,17 @@ public partial interface IConnection : SerializedName = @"pipeline", PossibleTypes = new [] { typeof(string) })] string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this connection", + Description = @"The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -508,25 +556,31 @@ public partial interface IConnection : SerializedName = @"requirementId", PossibleTypes = new [] { typeof(string) })] string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schemas for this connection", + Description = @"The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemas", PossibleTypes = new [] { typeof(ADT.Models.ISchema) })] System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schema URIs for this connection", + Description = @"The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemaUris", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List SchemaUri { get; set; } @@ -570,6 +624,8 @@ public partial interface IConnection : internal partial interface IConnectionInternal : ADT.Models.ITrackedResourceInternal { + /// Hostname specific to API Flows + string ApiHostname { get; set; } /// Approver of this connection request string Approver { get; set; } /// The timestamp that this connection request was submitted at @@ -577,11 +633,16 @@ internal partial interface IConnectionInternal : /// Direction of data movement [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } /// Force disablement status of the current connection - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// The managed service identities assigned to this resource. ADT.Models.IManagedServiceIdentity Identity { get; set; } @@ -615,7 +676,10 @@ internal partial interface IConnectionInternal : string Pin { get; set; } /// Pipeline to use to transfer data string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// The primary contact for this connection request string PrimaryContact { get; set; } @@ -628,9 +692,15 @@ internal partial interface IConnectionInternal : string RemoteSubscriptionId { get; set; } /// Requirement ID of the connection string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List SchemaUri { get; set; } /// The secondary contacts for this connection request System.Collections.Generic.List SecondaryContact { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.PowerShell.cs index 4d49ba8e67a1..dc9d3e6aef5b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.PowerShell.cs @@ -112,6 +112,10 @@ internal ConnectionProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IConnectionPropertiesInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IConnectionPropertiesInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IConnectionPropertiesInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IConnectionPropertiesInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IConnectionPropertiesInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IConnectionPropertiesInternal)this).RequirementId, global::System.Convert.ToString); @@ -156,6 +160,10 @@ internal ConnectionProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IConnectionPropertiesInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IConnectionPropertiesInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IConnectionPropertiesInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IConnectionPropertiesInternal)this).ApiHostname, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -209,6 +217,10 @@ internal ConnectionProperties(global::System.Management.Automation.PSObject cont { ((ADT.Models.IConnectionPropertiesInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IConnectionPropertiesInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IConnectionPropertiesInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IConnectionPropertiesInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IConnectionPropertiesInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IConnectionPropertiesInternal)this).RequirementId, global::System.Convert.ToString); @@ -253,6 +265,10 @@ internal ConnectionProperties(global::System.Management.Automation.PSObject cont { ((ADT.Models.IConnectionPropertiesInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IConnectionPropertiesInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IConnectionPropertiesInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IConnectionPropertiesInternal)this).ApiHostname, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.cs index 0dc17599127d..8082b0913190 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.cs @@ -37,6 +37,13 @@ public partial class ConnectionProperties : /// Internal Acessors for StatusReason string ADT.Models.IConnectionPropertiesInternal.StatusReason { get => this._statusReason; set { {_statusReason = value;} } } + /// Backing field for property. + private string _apiHostname; + + /// Hostname specific to API Flows + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ApiHostname { get => this._apiHostname; set => this._apiHostname = value; } + /// Backing field for property. private string _approver; @@ -58,10 +65,20 @@ public partial class ConnectionProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string Direction { get => this._direction; set => this._direction = value; } + /// Backing field for property. + private System.Collections.Generic.List _flowProfileList; + + /// Provides a list of FlowProfiles . + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List FlowProfileList { get => this._flowProfileList; set => this._flowProfileList = value; } + /// Backing field for property. private System.Collections.Generic.List _flowType; - /// The flow types being requested for this connection + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List FlowType { get => this._flowType; set => this._flowType = value; } @@ -110,7 +127,10 @@ public partial class ConnectionProperties : /// Backing field for property. private System.Collections.Generic.List _policy; - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } @@ -145,14 +165,20 @@ public partial class ConnectionProperties : /// Backing field for property. private System.Collections.Generic.List _schema; - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Schema { get => this._schema; set => this._schema = value; } /// Backing field for property. private System.Collections.Generic.List _schemaUri; - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List SchemaUri { get => this._schemaUri; set => this._schemaUri = value; } @@ -187,6 +213,17 @@ public ConnectionProperties() public partial interface IConnectionProperties : ADT.Runtime.IJsonSerializable { + /// Hostname specific to API Flows + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Hostname specific to API Flows", + SerializedName = @"apiHostname", + PossibleTypes = new [] { typeof(string) })] + string ApiHostname { get; set; } /// Approver of this connection request [ADT.Runtime.Info( Required = false, @@ -221,14 +258,28 @@ public partial interface IConnectionProperties : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Provides a list of FlowProfiles .", + SerializedName = @"flowProfileList", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfileMetadata) })] + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types being requested for this connection", + Description = @"The flow types being requested for this connection. This FlowType property has reached end of life support starting version 2025-05-30-preview. Please create a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -243,7 +294,7 @@ public partial interface IConnectionProperties : Description = @"Force disablement status of the current connection", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// Justification for the connection request [ADT.Runtime.Info( @@ -301,14 +352,17 @@ public partial interface IConnectionProperties : SerializedName = @"pipeline", PossibleTypes = new [] { typeof(string) })] string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this connection", + Description = @"The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -357,25 +411,31 @@ public partial interface IConnectionProperties : SerializedName = @"requirementId", PossibleTypes = new [] { typeof(string) })] string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schemas for this connection", + Description = @"The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemas", PossibleTypes = new [] { typeof(ADT.Models.ISchema) })] System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schema URIs for this connection", + Description = @"The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemaUris", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List SchemaUri { get; set; } @@ -419,6 +479,8 @@ public partial interface IConnectionProperties : internal partial interface IConnectionPropertiesInternal { + /// Hostname specific to API Flows + string ApiHostname { get; set; } /// Approver of this connection request string Approver { get; set; } /// The timestamp that this connection request was submitted at @@ -426,11 +488,16 @@ internal partial interface IConnectionPropertiesInternal /// Direction of data movement [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } /// Force disablement status of the current connection - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// Justification for the connection request string Justification { get; set; } @@ -443,7 +510,10 @@ internal partial interface IConnectionPropertiesInternal string Pin { get; set; } /// Pipeline to use to transfer data string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// The primary contact for this connection request string PrimaryContact { get; set; } @@ -454,9 +524,15 @@ internal partial interface IConnectionPropertiesInternal string RemoteSubscriptionId { get; set; } /// Requirement ID of the connection string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List SchemaUri { get; set; } /// The secondary contacts for this connection request System.Collections.Generic.List SecondaryContact { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.json.cs index 817d943518ea..da0970db7230 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ConnectionProperties.json.cs @@ -74,17 +74,19 @@ internal ConnectionProperties(ADT.Runtime.Json.JsonObject json) {_linkStatus = If( json?.PropertyT("linkStatus"), out var __jsonLinkStatus) ? (string)__jsonLinkStatus : (string)_linkStatus;} {_linkedConnectionId = If( json?.PropertyT("linkedConnectionId"), out var __jsonLinkedConnectionId) ? (string)__jsonLinkedConnectionId : (string)_linkedConnectionId;} {_flowType = If( json?.PropertyT("flowTypes"), out var __jsonFlowTypes) ? If( __jsonFlowTypes as ADT.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is ADT.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _flowType;} + {_flowProfileList = If( json?.PropertyT("flowProfileList"), out var __jsonFlowProfileList) ? If( __jsonFlowProfileList as ADT.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(ADT.Models.IFlowProfileMetadata) (ADT.Models.FlowProfileMetadata.FromJson(__k) )) ))() : null : _flowProfileList;} {_requirementId = If( json?.PropertyT("requirementId"), out var __jsonRequirementId) ? (string)__jsonRequirementId : (string)_requirementId;} {_remoteSubscriptionId = If( json?.PropertyT("remoteSubscriptionId"), out var __jsonRemoteSubscriptionId) ? (string)__jsonRemoteSubscriptionId : (string)_remoteSubscriptionId;} {_approver = If( json?.PropertyT("approver"), out var __jsonApprover) ? (string)__jsonApprover : (string)_approver;} {_pin = If( json?.PropertyT("pin"), out var __jsonPin) ? (string)__jsonPin : (string)_pin;} {_dateSubmitted = If( json?.PropertyT("dateSubmitted"), out var __jsonDateSubmitted) ? global::System.DateTime.TryParse((string)__jsonDateSubmitted, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateSubmittedValue) ? __jsonDateSubmittedValue : _dateSubmitted : _dateSubmitted;} {_primaryContact = If( json?.PropertyT("primaryContact"), out var __jsonPrimaryContact) ? (string)__jsonPrimaryContact : (string)_primaryContact;} - {_secondaryContact = If( json?.PropertyT("secondaryContacts"), out var __jsonSecondaryContacts) ? If( __jsonSecondaryContacts as ADT.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is ADT.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _secondaryContact;} + {_secondaryContact = If( json?.PropertyT("secondaryContacts"), out var __jsonSecondaryContacts) ? If( __jsonSecondaryContacts as ADT.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is ADT.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _secondaryContact;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} - {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as ADT.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is ADT.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _policy;} - {_schema = If( json?.PropertyT("schemas"), out var __jsonSchemas) ? If( __jsonSchemas as ADT.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(ADT.Models.ISchema) (ADT.Models.Schema.FromJson(__a) )) ))() : null : _schema;} - {_schemaUri = If( json?.PropertyT("schemaUris"), out var __jsonSchemaUris) ? If( __jsonSchemaUris as ADT.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is ADT.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : _schemaUri;} + {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as ADT.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is ADT.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : _policy;} + {_schema = If( json?.PropertyT("schemas"), out var __jsonSchemas) ? If( __jsonSchemas as ADT.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(ADT.Models.ISchema) (ADT.Models.Schema.FromJson(___v) )) ))() : null : _schema;} + {_schemaUri = If( json?.PropertyT("schemaUris"), out var __jsonSchemaUris) ? If( __jsonSchemaUris as ADT.Runtime.Json.JsonArray, out var ___r) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___r, (___q)=>(string) (___q is ADT.Runtime.Json.JsonString ___p ? (string)(___p.ToString()) : null)) ))() : null : _schemaUri;} + {_apiHostname = If( json?.PropertyT("apiHostname"), out var __jsonApiHostname) ? (string)__jsonApiHostname : (string)_apiHostname;} AfterFromJson(json); } @@ -157,6 +159,15 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A } container.Add("flowTypes",__r); } + if (null != this._flowProfileList) + { + var __m = new ADT.Runtime.Json.XNodeArray(); + foreach( var __n in this._flowProfileList ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("flowProfileList",__m); + } AddIf( null != (((object)this._requirementId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._requirementId.ToString()) : null, "requirementId" ,container.Add ); AddIf( null != (((object)this._remoteSubscriptionId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._remoteSubscriptionId.ToString()) : null, "remoteSubscriptionId" ,container.Add ); if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) @@ -171,12 +182,12 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._primaryContact)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._primaryContact.ToString()) : null, "primaryContact" ,container.Add ); if (null != this._secondaryContact) { - var __m = new ADT.Runtime.Json.XNodeArray(); - foreach( var __n in this._secondaryContact ) + var __h = new ADT.Runtime.Json.XNodeArray(); + foreach( var __i in this._secondaryContact ) { - AddIf(null != (((object)__n)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + AddIf(null != (((object)__i)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); } - container.Add("secondaryContacts",__m); + container.Add("secondaryContacts",__h); } if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) { @@ -184,31 +195,32 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A } if (null != this._policy) { - var __h = new ADT.Runtime.Json.XNodeArray(); - foreach( var __i in this._policy ) + var __c = new ADT.Runtime.Json.XNodeArray(); + foreach( var __d in this._policy ) { - AddIf(null != (((object)__i)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + AddIf(null != (((object)__d)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); } - container.Add("policies",__h); + container.Add("policies",__c); } if (null != this._schema) { - var __c = new ADT.Runtime.Json.XNodeArray(); - foreach( var __d in this._schema ) + var ___x = new ADT.Runtime.Json.XNodeArray(); + foreach( var ___y in this._schema ) { - AddIf(__d?.ToJson(null, serializationMode) ,__c.Add); + AddIf(___y?.ToJson(null, serializationMode) ,___x.Add); } - container.Add("schemas",__c); + container.Add("schemas",___x); } if (null != this._schemaUri) { - var ___x = new ADT.Runtime.Json.XNodeArray(); - foreach( var ___y in this._schemaUri ) + var ___s = new ADT.Runtime.Json.XNodeArray(); + foreach( var ___t in this._schemaUri ) { - AddIf(null != (((object)___y)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + AddIf(null != (((object)___t)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(___t.ToString()) : null ,___s.Add); } - container.Add("schemaUris",___x); + container.Add("schemaUris",___s); } + AddIf( null != (((object)this._apiHostname)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._apiHostname.ToString()) : null, "apiHostname" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.PowerShell.cs new file mode 100644 index 000000000000..f80fc512f7e6 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.PowerShell.cs @@ -0,0 +1,170 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Defines rules that enforce minimum and maximum file size limits for data replication. + /// + [System.ComponentModel.TypeConverter(typeof(DataSizeRulesetTypeConverter))] + public partial class DataSizeRuleset + { + + /// + /// 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 DataSizeRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Maximum")) + { + ((ADT.Models.IDataSizeRulesetInternal)this).Maximum = (long?) content.GetValueForProperty("Maximum",((ADT.Models.IDataSizeRulesetInternal)this).Maximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Minimum")) + { + ((ADT.Models.IDataSizeRulesetInternal)this).Minimum = (long?) content.GetValueForProperty("Minimum",((ADT.Models.IDataSizeRulesetInternal)this).Minimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DataSizeRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Maximum")) + { + ((ADT.Models.IDataSizeRulesetInternal)this).Maximum = (long?) content.GetValueForProperty("Maximum",((ADT.Models.IDataSizeRulesetInternal)this).Maximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("Minimum")) + { + ((ADT.Models.IDataSizeRulesetInternal)this).Minimum = (long?) content.GetValueForProperty("Minimum",((ADT.Models.IDataSizeRulesetInternal)this).Minimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// an instance of . + public static ADT.Models.IDataSizeRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DataSizeRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IDataSizeRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DataSizeRuleset(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 ADT.Models.IDataSizeRuleset FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Defines rules that enforce minimum and maximum file size limits for data replication. + [System.ComponentModel.TypeConverter(typeof(DataSizeRulesetTypeConverter))] + public partial interface IDataSizeRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.TypeConverter.cs new file mode 100644 index 000000000000..facc37f1a180 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DataSizeRulesetTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IDataSizeRuleset ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IDataSizeRuleset).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DataSizeRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DataSizeRuleset.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DataSizeRuleset.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.cs new file mode 100644 index 000000000000..56107b04f7be --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines rules that enforce minimum and maximum file size limits for data replication. + /// + public partial class DataSizeRuleset : + ADT.Models.IDataSizeRuleset, + ADT.Models.IDataSizeRulesetInternal + { + + /// Backing field for property. + private long? _maximum; + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public long? Maximum { get => this._maximum; set => this._maximum = value; } + + /// Backing field for property. + private long? _minimum; + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public long? Minimum { get => this._minimum; set => this._minimum = value; } + + /// Creates an new instance. + public DataSizeRuleset() + { + + } + } + /// Defines rules that enforce minimum and maximum file size limits for data replication. + public partial interface IDataSizeRuleset : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? Maximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? Minimum { get; set; } + + } + /// Defines rules that enforce minimum and maximum file size limits for data replication. + internal partial interface IDataSizeRulesetInternal + + { + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? Maximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? Minimum { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.json.cs new file mode 100644 index 000000000000..7d5df314b22a --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataSizeRuleset.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines rules that enforce minimum and maximum file size limits for data replication. + /// + public partial class DataSizeRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal DataSizeRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_maximum = If( json?.PropertyT("maximum"), out var __jsonMaximum) ? (long?)__jsonMaximum : _maximum;} + {_minimum = If( json?.PropertyT("minimum"), out var __jsonMinimum) ? (long?)__jsonMinimum : _minimum;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IDataSizeRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IDataSizeRuleset. + public static ADT.Models.IDataSizeRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new DataSizeRuleset(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._maximum ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((long)this._maximum) : null, "maximum" ,container.Add ); + AddIf( null != this._minimum ? (ADT.Runtime.Json.JsonNode)new ADT.Runtime.Json.JsonNumber((long)this._minimum) : null, "minimum" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.PowerShell.cs index f97644dcd762..ff021a5af9ab 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.PowerShell.cs @@ -95,6 +95,10 @@ internal DataTransferIdentity(global::System.Collections.IDictionary content) { ((ADT.Models.IDataTransferIdentityInternal)this).FlowName = (string) content.GetValueForProperty("FlowName",((ADT.Models.IDataTransferIdentityInternal)this).FlowName, global::System.Convert.ToString); } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IDataTransferIdentityInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IDataTransferIdentityInternal)this).FlowProfileName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((ADT.Models.IDataTransferIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IDataTransferIdentityInternal)this).Id, global::System.Convert.ToString); @@ -136,6 +140,10 @@ internal DataTransferIdentity(global::System.Management.Automation.PSObject cont { ((ADT.Models.IDataTransferIdentityInternal)this).FlowName = (string) content.GetValueForProperty("FlowName",((ADT.Models.IDataTransferIdentityInternal)this).FlowName, global::System.Convert.ToString); } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IDataTransferIdentityInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IDataTransferIdentityInternal)this).FlowProfileName, global::System.Convert.ToString); + } if (content.Contains("Id")) { ((ADT.Models.IDataTransferIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IDataTransferIdentityInternal)this).Id, global::System.Convert.ToString); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.cs index e1a3a20c98c9..17e9e408d38c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.cs @@ -26,6 +26,16 @@ public partial class DataTransferIdentity : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string FlowName { get => this._flowName; set => this._flowName = value; } + /// Backing field for property. + private string _flowProfileName; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string FlowProfileName { get => this._flowProfileName; set => this._flowProfileName = value; } + /// Backing field for property. private string _id; @@ -36,7 +46,7 @@ public partial class DataTransferIdentity : /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. [ADT.Origin(ADT.PropertyOrigin.Owned)] public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } @@ -85,6 +95,20 @@ public partial interface IDataTransferIdentity : SerializedName = @"flowName", PossibleTypes = new [] { typeof(string) })] string FlowName { get; set; } + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileName { get; set; } /// Resource identity path [ADT.Runtime.Info( Required = false, @@ -96,14 +120,14 @@ public partial interface IDataTransferIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] string PipelineName { get; set; } @@ -138,9 +162,14 @@ internal partial interface IDataTransferIdentityInternal string ConnectionName { get; set; } /// The name for the flow to perform the operation on. string FlowName { get; set; } + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + string FlowProfileName { get; set; } /// Resource identity path string Id { get; set; } - /// The name for the pipeline to perform the operation on. + /// The name of the pipeline on which to operate. string PipelineName { get; set; } /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.json.cs index 158dc45e4286..325e7a7b1a86 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/DataTransferIdentity.json.cs @@ -69,6 +69,7 @@ internal DataTransferIdentity(ADT.Runtime.Json.JsonObject json) {_connectionName = If( json?.PropertyT("connectionName"), out var __jsonConnectionName) ? (string)__jsonConnectionName : (string)_connectionName;} {_pipelineName = If( json?.PropertyT("pipelineName"), out var __jsonPipelineName) ? (string)__jsonPipelineName : (string)_pipelineName;} {_flowName = If( json?.PropertyT("flowName"), out var __jsonFlowName) ? (string)__jsonFlowName : (string)_flowName;} + {_flowProfileName = If( json?.PropertyT("flowProfileName"), out var __jsonFlowProfileName) ? (string)__jsonFlowProfileName : (string)_flowProfileName;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} AfterFromJson(json); } @@ -107,6 +108,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._connectionName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._connectionName.ToString()) : null, "connectionName" ,container.Add ); AddIf( null != (((object)this._pipelineName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._pipelineName.ToString()) : null, "pipelineName" ,container.Add ); AddIf( null != (((object)this._flowName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowName.ToString()) : null, "flowName" ,container.Add ); + AddIf( null != (((object)this._flowProfileName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowProfileName.ToString()) : null, "flowProfileName" ,container.Add ); AddIf( null != (((object)this._id)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); AfterToJson(ref container); return container; diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.PowerShell.cs index 230343a799bc..71d731e73be1 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.PowerShell.cs @@ -209,6 +209,10 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IFlowInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("Profile")) + { + ((ADT.Models.IFlowInternal)this).Profile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("Profile",((ADT.Models.IFlowInternal)this).Profile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOption")) { ((ADT.Models.IFlowInternal)this).ApiFlowOption = (ADT.Models.IApiFlowOptions) content.GetValueForProperty("ApiFlowOption",((ADT.Models.IFlowInternal)this).ApiFlowOption, ADT.Models.ApiFlowOptionsTypeConverter.ConvertFrom); @@ -257,6 +261,10 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IFlowInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IFlowInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IFlowInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("Policy")) { ((ADT.Models.IFlowInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((ADT.Models.IFlowInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -293,6 +301,10 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((ADT.Models.IFlowInternal)this).ConsumerGroup, global::System.Convert.ToString); } + if (content.Contains("ProfileStatus")) + { + ((ADT.Models.IFlowInternal)this).ProfileStatus = (string) content.GetValueForProperty("ProfileStatus",((ADT.Models.IFlowInternal)this).ProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IFlowInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IFlowInternal)this).SchemaId, global::System.Convert.ToString); @@ -345,6 +357,10 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IFlowInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IFlowInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IFlowInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IFlowInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IFlowInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -381,10 +397,38 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IFlowInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("ProfilePipeline")) + { + ((ADT.Models.IFlowInternal)this).ProfilePipeline = (string) content.GetValueForProperty("ProfilePipeline",((ADT.Models.IFlowInternal)this).ProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((ADT.Models.IFlowInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((ADT.Models.IFlowInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileReplicationScenario")) + { + ((ADT.Models.IFlowInternal)this).ProfileReplicationScenario = (string) content.GetValueForProperty("ProfileReplicationScenario",((ADT.Models.IFlowInternal)this).ProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("ProfileId")) + { + ((ADT.Models.IFlowInternal)this).ProfileId = (string) content.GetValueForProperty("ProfileId",((ADT.Models.IFlowInternal)this).ProfileId, global::System.Convert.ToString); + } + if (content.Contains("ProfileDescription")) + { + ((ADT.Models.IFlowInternal)this).ProfileDescription = (string) content.GetValueForProperty("ProfileDescription",((ADT.Models.IFlowInternal)this).ProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IFlowInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IFlowInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IFlowInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IFlowInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IFlowInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -393,6 +437,14 @@ internal Flow(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IFlowInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IFlowInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IFlowInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IFlowInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -522,6 +574,10 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IFlowInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("Profile")) + { + ((ADT.Models.IFlowInternal)this).Profile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("Profile",((ADT.Models.IFlowInternal)this).Profile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOption")) { ((ADT.Models.IFlowInternal)this).ApiFlowOption = (ADT.Models.IApiFlowOptions) content.GetValueForProperty("ApiFlowOption",((ADT.Models.IFlowInternal)this).ApiFlowOption, ADT.Models.ApiFlowOptionsTypeConverter.ConvertFrom); @@ -570,6 +626,10 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IFlowInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IFlowInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IFlowInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("Policy")) { ((ADT.Models.IFlowInternal)this).Policy = (System.Collections.Generic.List) content.GetValueForProperty("Policy",((ADT.Models.IFlowInternal)this).Policy, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -606,6 +666,10 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((ADT.Models.IFlowInternal)this).ConsumerGroup, global::System.Convert.ToString); } + if (content.Contains("ProfileStatus")) + { + ((ADT.Models.IFlowInternal)this).ProfileStatus = (string) content.GetValueForProperty("ProfileStatus",((ADT.Models.IFlowInternal)this).ProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IFlowInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IFlowInternal)this).SchemaId, global::System.Convert.ToString); @@ -658,6 +722,10 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IFlowInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IFlowInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IFlowInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IFlowInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IFlowInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -694,10 +762,38 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IFlowInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("ProfilePipeline")) + { + ((ADT.Models.IFlowInternal)this).ProfilePipeline = (string) content.GetValueForProperty("ProfilePipeline",((ADT.Models.IFlowInternal)this).ProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("ProfileName")) + { + ((ADT.Models.IFlowInternal)this).ProfileName = (string) content.GetValueForProperty("ProfileName",((ADT.Models.IFlowInternal)this).ProfileName, global::System.Convert.ToString); + } + if (content.Contains("ProfileReplicationScenario")) + { + ((ADT.Models.IFlowInternal)this).ProfileReplicationScenario = (string) content.GetValueForProperty("ProfileReplicationScenario",((ADT.Models.IFlowInternal)this).ProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("ProfileId")) + { + ((ADT.Models.IFlowInternal)this).ProfileId = (string) content.GetValueForProperty("ProfileId",((ADT.Models.IFlowInternal)this).ProfileId, global::System.Convert.ToString); + } + if (content.Contains("ProfileDescription")) + { + ((ADT.Models.IFlowInternal)this).ProfileDescription = (string) content.GetValueForProperty("ProfileDescription",((ADT.Models.IFlowInternal)this).ProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IFlowInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IFlowInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IFlowInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IFlowInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IFlowInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -706,6 +802,14 @@ internal Flow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IFlowInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IFlowInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IFlowInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IFlowInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.cs index 33b205d32faa..3cb9069f94fd 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Flow.cs @@ -19,6 +19,9 @@ public partial class Flow : /// Internal Acessors for ApiFlowOption ADT.Models.IApiFlowOptions ADT.Models.IFlowInternal.ApiFlowOption { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOption; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOption = value ?? null /* model class */; } + /// Internal Acessors for ApiFlowOptionRemoteEndpointSetting + ADT.Models.IRemoteEndpointSettings ADT.Models.IFlowInternal.ApiFlowOptionRemoteEndpointSetting { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteEndpointSetting; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteEndpointSetting = value ?? null /* model class */; } + /// Internal Acessors for Connection ADT.Models.ISelectedResource ADT.Models.IFlowInternal.Connection { get => ((ADT.Models.IFlowPropertiesInternal)Property).Connection; set => ((ADT.Models.IFlowPropertiesInternal)Property).Connection = value ?? null /* model class */; } @@ -49,6 +52,9 @@ public partial class Flow : /// Internal Acessors for Plan ADT.Models.IPlan ADT.Models.IFlowInternal.Plan { get => (this._plan = this._plan ?? new ADT.Models.Plan()); set { {_plan = value;} } } + /// Internal Acessors for Profile + ADT.Models.IFlowProfileMetadata ADT.Models.IFlowInternal.Profile { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfile; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfile = value ?? null /* model class */; } + /// Internal Acessors for Property ADT.Models.IFlowProperties ADT.Models.IFlowInternal.Property { get => (this._property = this._property ?? new ADT.Models.FlowProperties()); set { {_property = value;} } } @@ -97,27 +103,49 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionApiMode { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionApiMode; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionApiMode = value ?? null; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionAudienceOverride { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionAudienceOverride; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionAudienceOverride = value ?? null; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ApiFlowOptionAuthentication { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionAuthentication; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionAuthentication = value ?? null /* arrayOf */; } + /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionCname { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionCname; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionCname = value ?? null; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionIdentityTranslation { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionIdentityTranslation; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionIdentityTranslation = value ?? null; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteCallingModeClientId { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteCallingModeClientId; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteCallingModeClientId = value ?? null; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteEndpoint { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteEndpoint; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionRemoteEndpoint = value ?? null; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionSenderClientId { get => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionSenderClientId; set => ((ADT.Models.IFlowPropertiesInternal)Property).ApiFlowOptionSenderClientId = value ?? null; } @@ -145,7 +173,10 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string CustomerManagedKeyVaultUri { get => ((ADT.Models.IFlowPropertiesInternal)Property).CustomerManagedKeyVaultUri; set => ((ADT.Models.IFlowPropertiesInternal)Property).CustomerManagedKeyVaultUri = value ?? null; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string DataType { get => ((ADT.Models.IFlowPropertiesInternal)Property).DataType; set => ((ADT.Models.IFlowPropertiesInternal)Property).DataType = value ?? null; } @@ -161,11 +192,18 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string EventHubId { get => ((ADT.Models.IFlowPropertiesInternal)Property).EventHubId; set => ((ADT.Models.IFlowPropertiesInternal)Property).EventHubId = value ?? null; } + /// The Flow's data class. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowDataType { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowDataType; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowDataType = value ?? null; } + /// Dataflow GUID associated with this flow [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string FlowId { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowId; } - /// The flow type for this flow + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string FlowType { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowType; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowType = value ?? null; } @@ -232,6 +270,13 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string MessagingOptionBillingTier { get => ((ADT.Models.IFlowPropertiesInternal)Property).MessagingOptionBillingTier; set => ((ADT.Models.IFlowPropertiesInternal)Property).MessagingOptionBillingTier = value ?? null; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MessagingOptionPerformancePriority { get => ((ADT.Models.IFlowPropertiesInternal)Property).MessagingOptionPerformancePriority; set => ((ADT.Models.IFlowPropertiesInternal)Property).MessagingOptionPerformancePriority = value ?? null; } + /// The name of the resource [ADT.Origin(ADT.PropertyOrigin.Inherited)] public string Name { get => ((ADT.Models.IResourceInternal)__trackedResource).Name; } @@ -272,10 +317,47 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string PlanVersion { get => ((ADT.Models.IPlanInternal)Plan).Version; set => ((ADT.Models.IPlanInternal)Plan).Version = value ?? null; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List Policy { get => ((ADT.Models.IFlowPropertiesInternal)Property).Policy; set => ((ADT.Models.IFlowPropertiesInternal)Property).Policy = value ?? null /* arrayOf */; } + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfileDescription { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileDescription; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileDescription = value ?? null; } + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfileId { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileId; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileId = value ?? null; } + + /// The name of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfileName { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileName; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileName = value ?? null; } + + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfilePipeline { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfilePipeline; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfilePipeline = value ?? null; } + + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfileReplicationScenario { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileReplicationScenario; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileReplicationScenario = value ?? null; } + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProfileStatus { get => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileStatus; set => ((ADT.Models.IFlowPropertiesInternal)Property).FlowProfileStatus = value ?? null; } + /// Backing field for property. private ADT.Models.IFlowProperties _property; @@ -287,6 +369,17 @@ public partial class Flow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ProvisioningState { get => ((ADT.Models.IFlowPropertiesInternal)Property).ProvisioningState; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List RemoteEndpointSettingAuthentication { get => ((ADT.Models.IFlowPropertiesInternal)Property).RemoteEndpointSettingAuthentication; set => ((ADT.Models.IFlowPropertiesInternal)Property).RemoteEndpointSettingAuthentication = value ?? null /* arrayOf */; } + + /// The remote endpoint uri all API calls. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string RemoteEndpointSettingEndpoint { get => ((ADT.Models.IFlowPropertiesInternal)Property).RemoteEndpointSettingEndpoint; set => ((ADT.Models.IFlowPropertiesInternal)Property).RemoteEndpointSettingEndpoint = value ?? null; } + /// Gets the resource group name [ADT.Origin(ADT.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); } @@ -440,17 +533,34 @@ public partial interface IFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Optional field to override the audience of the remote endpoint", + Description = @"Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"audienceOverride", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Runtime.Info( Required = false, @@ -462,48 +572,60 @@ public partial interface IFlow : SerializedName = @"cname", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Flag for if Azure Data Transfer API Flow should extract the user token", + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"identityTranslation", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote stub app registration Client ID", + Description = @"Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"remoteCallingModeClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote host to which communication needs to be made", + Description = @"Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.", SerializedName = @"remoteEndpoint", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Sender's app user assigned Manage Identity client ID", + Description = @"Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"senderClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionSenderClientId { get; set; } @@ -573,14 +695,17 @@ public partial interface IFlow : SerializedName = @"customerManagedKeyVaultUri", PossibleTypes = new [] { typeof(string) })] string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Type of data to transfer via the flow.", + Description = @"Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] @@ -618,6 +743,18 @@ public partial interface IFlow : SerializedName = @"eventHubId", PossibleTypes = new [] { typeof(string) })] string EventHubId { get; set; } + /// The Flow's data class. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Flow's data class.", + SerializedName = @"flowDataType", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow [ADT.Runtime.Info( Required = false, @@ -629,14 +766,17 @@ public partial interface IFlow : SerializedName = @"flowId", PossibleTypes = new [] { typeof(string) })] string FlowId { get; } - /// The flow type for this flow + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow type for this flow", + Description = @"The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -651,7 +791,7 @@ public partial interface IFlow : Description = @"Force disablement status of the current flow", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. @@ -754,6 +894,21 @@ public partial interface IFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions", + SerializedName = @"performancePriority", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The passphrase used for SRT streams [ADT.Runtime.Info( Required = false, @@ -825,17 +980,98 @@ public partial interface IFlow : SerializedName = @"version", PossibleTypes = new [] { typeof(string) })] string PlanVersion { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this flow", + Description = @"The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string ProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string ProfileId { get; set; } + /// The name of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the FlowProfile.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the parent Pipeline Azure resource associated with this FlowProfile.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + string ProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string ProfileStatus { get; set; } /// Provisioning state of the flow [ADT.Runtime.Info( Required = false, @@ -848,6 +1084,31 @@ public partial interface IFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string RemoteEndpointSettingEndpoint { get; set; } /// Connection ID associated with this schema [ADT.Runtime.Info( Required = false, @@ -1064,18 +1325,40 @@ internal partial interface IFlowInternal : /// [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// Defines the destination remote endpoint for the API calls. + ADT.Models.IRemoteEndpointSettings ApiFlowOptionRemoteEndpointSetting { get; set; } + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionSenderClientId { get; set; } /// The connection associated with this flow ADT.Models.ISelectedResource Connection { get; set; } @@ -1091,7 +1374,10 @@ internal partial interface IFlowInternal : string ConsumerGroup { get; set; } /// The URI to the customer managed key for this flow string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] string DataType { get; set; } /// The destination endpoints of the stream @@ -1100,13 +1386,19 @@ internal partial interface IFlowInternal : System.Collections.Generic.List DestinationEndpointPort { get; set; } /// Event Hub ID string EventHubId { get; set; } + /// The Flow's data class. + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow string FlowId { get; set; } - /// The flow type for this flow + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] string FlowType { get; set; } /// Force disablement status of the current flow - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// The managed service identities assigned to this resource. ADT.Models.IManagedServiceIdentity Identity { get; set; } @@ -1141,6 +1433,12 @@ internal partial interface IFlowInternal : /// Billing tier for this messaging flow [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The passphrase used for SRT streams string Passphrase { get; set; } /// Details of the resource plan. @@ -1160,14 +1458,53 @@ internal partial interface IFlowInternal : string PlanPublisher { get; set; } /// The version of the desired product/artifact. string PlanVersion { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } + /// Type of FlowProfile to use for transfer via the flow. + ADT.Models.IFlowProfileMetadata Profile { get; set; } + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + string ProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string ProfileId { get; set; } + /// The name of the FlowProfile. + string ProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + string ProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string ProfileStatus { get; set; } /// Properties of flow ADT.Models.IFlowProperties Property { get; set; } /// Provisioning state of the flow [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; set; } - /// The selected schema for this flow + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + string RemoteEndpointSettingEndpoint { get; set; } + /// + /// The selected schema for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// ADT.Models.ISchema Schema { get; set; } /// Connection ID associated with this schema string SchemaConnectionId { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.PowerShell.cs new file mode 100644 index 000000000000..2d2202d8fce6 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.PowerShell.cs @@ -0,0 +1,500 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + /// + [System.ComponentModel.TypeConverter(typeof(FlowProfileTypeConverter))] + public partial class FlowProfile + { + + /// + /// 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 ADT.Models.IFlowProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfile(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((ADT.Models.IFlowProfileInternal)this).Property = (ADT.Models.IFlowProfileProperties) content.GetValueForProperty("Property",((ADT.Models.IFlowProfileInternal)this).Property, ADT.Models.FlowProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((ADT.Models.IFlowProfileInternal)this).Identity = (ADT.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((ADT.Models.IFlowProfileInternal)this).Identity, ADT.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((ADT.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((ADT.Models.IResourceInternal)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")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((ADT.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((ADT.Models.IResourceInternal)this).SystemData = (ADT.Models.ISystemData) content.GetValueForProperty("SystemData",((ADT.Models.IResourceInternal)this).SystemData, ADT.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((ADT.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((ADT.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((ADT.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((ADT.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((ADT.Models.ITrackedResourceInternal)this).Tag = (ADT.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((ADT.Models.ITrackedResourceInternal)this).Tag, ADT.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((ADT.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((ADT.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfileInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfileInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfileInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfileInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfileInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfileInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfileInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfileInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfileInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfileInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfileInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfileInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IFlowProfileInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((ADT.Models.IFlowProfileInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((ADT.Models.IFlowProfileInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityUserAssignedIdentity = (ADT.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((ADT.Models.IFlowProfileInternal)this).IdentityUserAssignedIdentity, ADT.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfileInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfileInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfileInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfileInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfileInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfileInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfileInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfileInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfileInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfileInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfileInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfileInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfileInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfileInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfileInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfileInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfileInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfileInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfileInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfileInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfileInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlowProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((ADT.Models.IFlowProfileInternal)this).Property = (ADT.Models.IFlowProfileProperties) content.GetValueForProperty("Property",((ADT.Models.IFlowProfileInternal)this).Property, ADT.Models.FlowProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((ADT.Models.IFlowProfileInternal)this).Identity = (ADT.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((ADT.Models.IFlowProfileInternal)this).Identity, ADT.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((ADT.Models.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((ADT.Models.IResourceInternal)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")) + { + ((ADT.Models.IResourceInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((ADT.Models.IResourceInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedByType = (string) content.GetValueForProperty("SystemDataLastModifiedByType",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedByType, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((ADT.Models.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((ADT.Models.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((ADT.Models.IResourceInternal)this).SystemData = (ADT.Models.ISystemData) content.GetValueForProperty("SystemData",((ADT.Models.IResourceInternal)this).SystemData, ADT.Models.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((ADT.Models.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((ADT.Models.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((ADT.Models.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((ADT.Models.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((ADT.Models.ITrackedResourceInternal)this).Tag = (ADT.Models.ITrackedResourceTags) content.GetValueForProperty("Tag",((ADT.Models.ITrackedResourceInternal)this).Tag, ADT.Models.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((ADT.Models.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((ADT.Models.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfileInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfileInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfileInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfileInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfileInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfileInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfileInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfileInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfileInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfileInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfileInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfileInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IFlowProfileInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((ADT.Models.IFlowProfileInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((ADT.Models.IFlowProfileInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((ADT.Models.IFlowProfileInternal)this).IdentityUserAssignedIdentity = (ADT.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((ADT.Models.IFlowProfileInternal)this).IdentityUserAssignedIdentity, ADT.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfileInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfileInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfileInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfileInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfileInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfileInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfileInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfileInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfileInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfileInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfileInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfileInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfileInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfileInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfileInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfileInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfileInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfileInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfileInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfileInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfileInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfileInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfileInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfileInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfileInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.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 ADT.Models.IFlowProfile FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + [System.ComponentModel.TypeConverter(typeof(FlowProfileTypeConverter))] + public partial interface IFlowProfile + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.TypeConverter.cs new file mode 100644 index 000000000000..eb156b0b94b0 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfileTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfile.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.cs new file mode 100644 index 000000000000..b545f504947f --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.cs @@ -0,0 +1,732 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + /// + public partial class FlowProfile : + ADT.Models.IFlowProfile, + ADT.Models.IFlowProfileInternal, + ADT.Runtime.IValidates + { + /// Backing field for Inherited model + private ADT.Models.ITrackedResource __trackedResource = new ADT.Models.TrackedResource(); + + /// Internal Acessors for FlowProfileId + string ADT.Models.IFlowProfileInternal.FlowProfileId { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).FlowProfileId; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).FlowProfileId = value ?? null; } + + /// Internal Acessors for Identity + ADT.Models.IManagedServiceIdentity ADT.Models.IFlowProfileInternal.Identity { get => (this._identity = this._identity ?? new ADT.Models.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string ADT.Models.IFlowProfileInternal.IdentityPrincipalId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string ADT.Models.IFlowProfileInternal.IdentityTenantId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId = value ?? null; } + + /// Internal Acessors for Property + ADT.Models.IFlowProfileProperties ADT.Models.IFlowProfileInternal.Property { get => (this._property = this._property ?? new ADT.Models.FlowProfileProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string ADT.Models.IFlowProfileInternal.ProvisioningState { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ProvisioningState; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Ruleset + ADT.Models.IFlowProfileRulesets ADT.Models.IFlowProfileInternal.Ruleset { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Ruleset; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Ruleset = value ?? null /* model class */; } + + /// Internal Acessors for RulesetAntiviru + ADT.Models.IAntivirusRuleset ADT.Models.IFlowProfileInternal.RulesetAntiviru { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetAntiviru; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetAntiviru = value ?? null /* model class */; } + + /// Internal Acessors for RulesetArchive + ADT.Models.IArchiveRuleset ADT.Models.IFlowProfileInternal.RulesetArchive { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetArchive; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetArchive = value ?? null /* model class */; } + + /// Internal Acessors for RulesetDataSize + ADT.Models.IDataSizeRuleset ADT.Models.IFlowProfileInternal.RulesetDataSize { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetDataSize; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetDataSize = value ?? null /* model class */; } + + /// Internal Acessors for RulesetMimeFilter + ADT.Models.IMimeFilterRuleset ADT.Models.IFlowProfileInternal.RulesetMimeFilter { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetMimeFilter; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetMimeFilter = value ?? null /* model class */; } + + /// Internal Acessors for RulesetTextMatching + ADT.Models.ITextMatchingRuleset ADT.Models.IFlowProfileInternal.RulesetTextMatching { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetTextMatching; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetTextMatching = value ?? null /* model class */; } + + /// Internal Acessors for RulesetXmlFilter + ADT.Models.IXmlFilterRuleset ADT.Models.IFlowProfileInternal.RulesetXmlFilter { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetXmlFilter; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).RulesetXmlFilter = value ?? null /* model class */; } + + /// Internal Acessors for Id + string ADT.Models.IResourceInternal.Id { get => ((ADT.Models.IResourceInternal)__trackedResource).Id; set => ((ADT.Models.IResourceInternal)__trackedResource).Id = value ?? null; } + + /// Internal Acessors for Name + string ADT.Models.IResourceInternal.Name { get => ((ADT.Models.IResourceInternal)__trackedResource).Name; set => ((ADT.Models.IResourceInternal)__trackedResource).Name = value ?? null; } + + /// Internal Acessors for SystemData + ADT.Models.ISystemData ADT.Models.IResourceInternal.SystemData { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemData; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// Internal Acessors for SystemDataCreatedAt + global::System.DateTime? ADT.Models.IResourceInternal.SystemDataCreatedAt { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataCreatedBy + string ADT.Models.IResourceInternal.SystemDataCreatedBy { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// Internal Acessors for SystemDataCreatedByType + string ADT.Models.IResourceInternal.SystemDataCreatedByType { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedAt + global::System.DateTime? ADT.Models.IResourceInternal.SystemDataLastModifiedAt { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// Internal Acessors for SystemDataLastModifiedBy + string ADT.Models.IResourceInternal.SystemDataLastModifiedBy { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// Internal Acessors for SystemDataLastModifiedByType + string ADT.Models.IResourceInternal.SystemDataLastModifiedByType { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? null; } + + /// Internal Acessors for Type + string ADT.Models.IResourceInternal.Type { get => ((ADT.Models.IResourceInternal)__trackedResource).Type; set => ((ADT.Models.IResourceInternal)__trackedResource).Type = value ?? null; } + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AntivirusAvSolution { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).AntivirusAvSolution; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).AntivirusAvSolution = value ?? null /* arrayOf */; } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public double? ArchiveMaximumCompressionRatioLimit { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumCompressionRatioLimit; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumCompressionRatioLimit = value ?? default(double); } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumDepthLimit { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumDepthLimit; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumDepthLimit = value ?? default(long); } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumExpansionSizeLimit { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumExpansionSizeLimit; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMaximumExpansionSizeLimit = value ?? default(long); } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMinimumSizeForExpansion { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMinimumSizeForExpansion; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ArchiveMinimumSizeForExpansion = value ?? default(long); } + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMaximum { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).DataSizeMaximum; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).DataSizeMaximum = value ?? default(long); } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMinimum { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).DataSizeMinimum; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).DataSizeMinimum = value ?? default(long); } + + /// A user-defined description of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string Description { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Description; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Description = value ?? null; } + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileId { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).FlowProfileId; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string Id { get => ((ADT.Models.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private ADT.Models.IManagedServiceIdentity _identity; + + /// The managed service identities assigned to this resource. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new ADT.Models.ManagedServiceIdentity()); set => this._identity = value; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityType { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).Type; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).Type = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// The geo-location where the resource lives + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string Location { get => ((ADT.Models.ITrackedResourceInternal)__trackedResource).Location; set => ((ADT.Models.ITrackedResourceInternal)__trackedResource).Location = value ?? null; } + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MimeFilter { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).MimeFilter; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).MimeFilter = value ?? null /* arrayOf */; } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MimeFilterType { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).MimeFilterType; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).MimeFilterType = value ?? null; } + + /// The name of the resource + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string Name { get => ((ADT.Models.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private ADT.Models.IFlowProfileProperties _property; + + /// + /// The set of configuration properties that define the behavior and rules of the FlowProfile. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfileProperties Property { get => (this._property = this._property ?? new ADT.Models.FlowProfileProperties()); set => this._property = value; } + + /// The current provisioning state of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ProvisioningState; } + + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ReplicationScenario { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ReplicationScenario; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).ReplicationScenario = value ?? null; } + + /// Gets the resource group name + [ADT.Origin(ADT.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); } + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string Status { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Status; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).Status = value ?? null; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + internal ADT.Models.ISystemData SystemData { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemData; set => ((ADT.Models.IResourceInternal)__trackedResource).SystemData = value ?? null /* model class */; } + + /// The timestamp of resource creation (UTC). + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedAt; } + + /// The identity that created the resource. + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedBy; } + + /// The type of identity that created the resource. + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string SystemDataCreatedByType { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataCreatedByType; } + + /// The timestamp of resource last modification (UTC) + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; } + + /// The identity that last modified the resource. + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; } + + /// The type of identity that last modified the resource. + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedByType { get => ((ADT.Models.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; } + + /// Resource tags. + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public ADT.Models.ITrackedResourceTags Tag { get => ((ADT.Models.ITrackedResourceInternal)__trackedResource).Tag; set => ((ADT.Models.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TextMatchingDeny { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).TextMatchingDeny; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).TextMatchingDeny = value ?? null /* arrayOf */; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [ADT.Origin(ADT.PropertyOrigin.Inherited)] + public string Type { get => ((ADT.Models.IResourceInternal)__trackedResource).Type; } + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterDefaultNamespace { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterDefaultNamespace; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterDefaultNamespace = value ?? null; } + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterReference { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterReference; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterReference = value ?? null; } + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterSchema { get => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterSchema; set => ((ADT.Models.IFlowProfilePropertiesInternal)Property).XmlFilterSchema = value ?? null; } + + /// Creates an new instance. + public FlowProfile() + { + + } + + /// 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(ADT.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + public partial interface IFlowProfile : + ADT.Runtime.IJsonSerializable, + ADT.Models.ITrackedResource + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMinimum { get; set; } + /// A user-defined description of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user-defined description of the FlowProfile.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileId { get; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of the FlowProfile.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; } + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterSchema { get; set; } + + } + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + internal partial interface IFlowProfileInternal : + ADT.Models.ITrackedResourceInternal + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? DataSizeMinimum { get; set; } + /// A user-defined description of the FlowProfile. + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string FlowProfileId { get; set; } + /// The managed service identities assigned to this resource. + ADT.Models.IManagedServiceIdentity Identity { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityPrincipalId { get; set; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityTenantId { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// + /// The set of configuration properties that define the behavior and rules of the FlowProfile. + /// + ADT.Models.IFlowProfileProperties Property { get; set; } + /// The current provisioning state of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// A set of configurable rulesets applied to this FlowProfile. + ADT.Models.IFlowProfileRulesets Ruleset { get; set; } + /// Antivirus scanning rules for replicated data. + ADT.Models.IAntivirusRuleset RulesetAntiviru { get; set; } + /// Rules for handling archive files during replication. + ADT.Models.IArchiveRuleset RulesetArchive { get; set; } + /// Rules that enforce minimum and maximum data size limits. + ADT.Models.IDataSizeRuleset RulesetDataSize { get; set; } + /// Rules for filtering files based on MIME types. + ADT.Models.IMimeFilterRuleset RulesetMimeFilter { get; set; } + /// Rules for detecting and blocking specific text patterns. + ADT.Models.ITextMatchingRuleset RulesetTextMatching { get; set; } + /// Rules for filtering XML content using XSD schemas. + ADT.Models.IXmlFilterRuleset RulesetXmlFilter { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + string XmlFilterSchema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.json.cs new file mode 100644 index 000000000000..c70017836902 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfile.json.cs @@ -0,0 +1,113 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + /// + public partial class FlowProfile + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfile(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new ADT.Models.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? ADT.Models.FlowProfileProperties.FromJson(__jsonProperties) : _property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? ADT.Models.ManagedServiceIdentity.FromJson(__jsonIdentity) : _identity;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfile. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfile. + public static ADT.Models.IFlowProfile FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfile(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (ADT.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._identity ? (ADT.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.PowerShell.cs new file mode 100644 index 000000000000..11453cffcdc0 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.PowerShell.cs @@ -0,0 +1,168 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// The response of a FlowProfile list operation. + [System.ComponentModel.TypeConverter(typeof(FlowProfileListResultTypeConverter))] + public partial class FlowProfileListResult + { + + /// + /// 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 ADT.Models.IFlowProfileListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfileListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfileListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfileListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfileListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((ADT.Models.IFlowProfileListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((ADT.Models.IFlowProfileListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((ADT.Models.IFlowProfileListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((ADT.Models.IFlowProfileListResultInternal)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 FlowProfileListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((ADT.Models.IFlowProfileListResultInternal)this).Value = (System.Collections.Generic.List) content.GetValueForProperty("Value",((ADT.Models.IFlowProfileListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((ADT.Models.IFlowProfileListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((ADT.Models.IFlowProfileListResultInternal)this).NextLink, global::System.Convert.ToString); + } + 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 ADT.Models.IFlowProfileListResult FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// The response of a FlowProfile list operation. + [System.ComponentModel.TypeConverter(typeof(FlowProfileListResultTypeConverter))] + public partial interface IFlowProfileListResult + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.TypeConverter.cs new file mode 100644 index 000000000000..c2ef2dd8e7dd --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfileListResultTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfileListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfileListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfileListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfileListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfileListResult.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.cs new file mode 100644 index 000000000000..a4821b8525f8 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.cs @@ -0,0 +1,74 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// The response of a FlowProfile list operation. + public partial class FlowProfileListResult : + ADT.Models.IFlowProfileListResult, + ADT.Models.IFlowProfileListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private System.Collections.Generic.List _value; + + /// The FlowProfile items on this page + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public FlowProfileListResult() + { + + } + } + /// The response of a FlowProfile list operation. + public partial interface IFlowProfileListResult : + ADT.Runtime.IJsonSerializable + { + /// The link to the next page of items + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The FlowProfile items on this page + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The FlowProfile items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfile) })] + System.Collections.Generic.List Value { get; set; } + + } + /// The response of a FlowProfile list operation. + internal partial interface IFlowProfileListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The FlowProfile items on this page + System.Collections.Generic.List Value { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.json.cs new file mode 100644 index 000000000000..7ecb170543ea --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileListResult.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// The response of a FlowProfile list operation. + public partial class FlowProfileListResult + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfileListResult(ADT.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 ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(ADT.Models.IFlowProfile) (ADT.Models.FlowProfile.FromJson(__u) )) ))() : null : _value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)_nextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfileListResult. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfileListResult. + public static ADT.Models.IFlowProfileListResult FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfileListResult(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new ADT.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()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.PowerShell.cs new file mode 100644 index 000000000000..9723cb91df7b --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.PowerShell.cs @@ -0,0 +1,202 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + /// + [System.ComponentModel.TypeConverter(typeof(FlowProfileMetadataTypeConverter))] + public partial class FlowProfileMetadata + { + + /// + /// 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 ADT.Models.IFlowProfileMetadata DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfileMetadata(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfileMetadata DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfileMetadata(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfileMetadata(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Pipeline")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Pipeline = (string) content.GetValueForProperty("Pipeline",((ADT.Models.IFlowProfileMetadataInternal)this).Pipeline, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Name = (string) content.GetValueForProperty("Name",((ADT.Models.IFlowProfileMetadataInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfileMetadataInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfileMetadataInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfileMetadataInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfileMetadataInternal)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 FlowProfileMetadata(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Pipeline")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Pipeline = (string) content.GetValueForProperty("Pipeline",((ADT.Models.IFlowProfileMetadataInternal)this).Pipeline, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Name = (string) content.GetValueForProperty("Name",((ADT.Models.IFlowProfileMetadataInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfileMetadataInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfileMetadataInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfileMetadataInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfileMetadataInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfileMetadataInternal)this).Description, global::System.Convert.ToString); + } + 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 ADT.Models.IFlowProfileMetadata FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + [System.ComponentModel.TypeConverter(typeof(FlowProfileMetadataTypeConverter))] + public partial interface IFlowProfileMetadata + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.TypeConverter.cs new file mode 100644 index 000000000000..02922f06cab4 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfileMetadataTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfileMetadata ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfileMetadata).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfileMetadata.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfileMetadata.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfileMetadata.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.cs new file mode 100644 index 000000000000..6c6479b086b7 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.cs @@ -0,0 +1,190 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + /// + public partial class FlowProfileMetadata : + ADT.Models.IFlowProfileMetadata, + ADT.Models.IFlowProfileMetadataInternal + { + + /// Backing field for property. + private string _description; + + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _flowProfileId; + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string FlowProfileId { get => this._flowProfileId; set => this._flowProfileId = value; } + + /// Backing field for property. + private string _name; + + /// The name of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _pipeline; + + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Pipeline { get => this._pipeline; set => this._pipeline = value; } + + /// Backing field for property. + private string _replicationScenario; + + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ReplicationScenario { get => this._replicationScenario; set => this._replicationScenario = value; } + + /// Backing field for property. + private string _status; + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// Creates an new instance. + public FlowProfileMetadata() + { + + } + } + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + public partial interface IFlowProfileMetadata : + ADT.Runtime.IJsonSerializable + { + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the FlowProfile.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the parent Pipeline Azure resource associated with this FlowProfile.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + string Pipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + + } + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + internal partial interface IFlowProfileMetadataInternal + + { + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + string Name { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + string Pipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.json.cs new file mode 100644 index 000000000000..a831cea7a2ba --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileMetadata.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// The FlowProfile Metadata used to concisely provide all publicly viewable information. + /// + public partial class FlowProfileMetadata + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfileMetadata(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_pipeline = If( json?.PropertyT("pipeline"), out var __jsonPipeline) ? (string)__jsonPipeline : (string)_pipeline;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} + {_replicationScenario = If( json?.PropertyT("replicationScenario"), out var __jsonReplicationScenario) ? (string)__jsonReplicationScenario : (string)_replicationScenario;} + {_flowProfileId = If( json?.PropertyT("flowProfileId"), out var __jsonFlowProfileId) ? (string)__jsonFlowProfileId : (string)_flowProfileId;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfileMetadata. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfileMetadata. + public static ADT.Models.IFlowProfileMetadata FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfileMetadata(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._pipeline)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._pipeline.ToString()) : null, "pipeline" ,container.Add ); + AddIf( null != (((object)this._name)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._replicationScenario)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._replicationScenario.ToString()) : null, "replicationScenario" ,container.Add ); + AddIf( null != (((object)this._flowProfileId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowProfileId.ToString()) : null, "flowProfileId" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.PowerShell.cs new file mode 100644 index 000000000000..96965dcab52e --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.PowerShell.cs @@ -0,0 +1,392 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Defines the patchable properties for a FlowProfile resource. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePatchTypeConverter))] + public partial class FlowProfilePatch + { + + /// + /// 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 ADT.Models.IFlowProfilePatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfilePatch(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfilePatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfilePatch(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfilePatch(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Property = (ADT.Models.IFlowProfilePatchProperties) content.GetValueForProperty("Property",((ADT.Models.IFlowProfilePatchInternal)this).Property, ADT.Models.FlowProfilePatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Identity = (ADT.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((ADT.Models.IFlowProfilePatchInternal)this).Identity, ADT.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Tag = (ADT.Models.IFlowProfilePatchTags) content.GetValueForProperty("Tag",((ADT.Models.IFlowProfilePatchInternal)this).Tag, ADT.Models.FlowProfilePatchTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePatchInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePatchInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePatchInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePatchInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IFlowProfilePatchInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((ADT.Models.IFlowProfilePatchInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((ADT.Models.IFlowProfilePatchInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityUserAssignedIdentity = (ADT.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((ADT.Models.IFlowProfilePatchInternal)this).IdentityUserAssignedIdentity, ADT.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePatchInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePatchInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePatchInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePatchInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePatchInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePatchInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePatchInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePatchInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePatchInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePatchInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlowProfilePatch(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Property = (ADT.Models.IFlowProfilePatchProperties) content.GetValueForProperty("Property",((ADT.Models.IFlowProfilePatchInternal)this).Property, ADT.Models.FlowProfilePatchPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Identity = (ADT.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((ADT.Models.IFlowProfilePatchInternal)this).Identity, ADT.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Tag = (ADT.Models.IFlowProfilePatchTags) content.GetValueForProperty("Tag",((ADT.Models.IFlowProfilePatchInternal)this).Tag, ADT.Models.FlowProfilePatchTagsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePatchInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePatchInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePatchInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePatchInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("IdentityPrincipalId")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((ADT.Models.IFlowProfilePatchInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((ADT.Models.IFlowProfilePatchInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((ADT.Models.IFlowProfilePatchInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).IdentityUserAssignedIdentity = (ADT.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((ADT.Models.IFlowProfilePatchInternal)this).IdentityUserAssignedIdentity, ADT.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePatchInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePatchInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePatchInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePatchInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePatchInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePatchInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePatchInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePatchInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePatchInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePatchInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePatchInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePatchInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePatchInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePatchInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.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 ADT.Models.IFlowProfilePatch FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Defines the patchable properties for a FlowProfile resource. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePatchTypeConverter))] + public partial interface IFlowProfilePatch + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.TypeConverter.cs new file mode 100644 index 000000000000..6b4e075b970c --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfilePatchTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfilePatch ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfilePatch).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfilePatch.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfilePatch.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfilePatch.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.cs new file mode 100644 index 000000000000..36000638ee82 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.cs @@ -0,0 +1,588 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Defines the patchable properties for a FlowProfile resource. + public partial class FlowProfilePatch : + ADT.Models.IFlowProfilePatch, + ADT.Models.IFlowProfilePatchInternal + { + + /// Internal Acessors for Identity + ADT.Models.IManagedServiceIdentity ADT.Models.IFlowProfilePatchInternal.Identity { get => (this._identity = this._identity ?? new ADT.Models.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string ADT.Models.IFlowProfilePatchInternal.IdentityPrincipalId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string ADT.Models.IFlowProfilePatchInternal.IdentityTenantId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId = value ?? null; } + + /// Internal Acessors for Property + ADT.Models.IFlowProfilePatchProperties ADT.Models.IFlowProfilePatchInternal.Property { get => (this._property = this._property ?? new ADT.Models.FlowProfilePatchProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string ADT.Models.IFlowProfilePatchInternal.ProvisioningState { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ProvisioningState; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ProvisioningState = value ?? null; } + + /// Internal Acessors for Ruleset + ADT.Models.IFlowProfileRulesets ADT.Models.IFlowProfilePatchInternal.Ruleset { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Ruleset; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Ruleset = value ?? null /* model class */; } + + /// Internal Acessors for RulesetAntiviru + ADT.Models.IAntivirusRuleset ADT.Models.IFlowProfilePatchInternal.RulesetAntiviru { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetAntiviru; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetAntiviru = value ?? null /* model class */; } + + /// Internal Acessors for RulesetArchive + ADT.Models.IArchiveRuleset ADT.Models.IFlowProfilePatchInternal.RulesetArchive { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetArchive; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetArchive = value ?? null /* model class */; } + + /// Internal Acessors for RulesetDataSize + ADT.Models.IDataSizeRuleset ADT.Models.IFlowProfilePatchInternal.RulesetDataSize { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetDataSize; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetDataSize = value ?? null /* model class */; } + + /// Internal Acessors for RulesetMimeFilter + ADT.Models.IMimeFilterRuleset ADT.Models.IFlowProfilePatchInternal.RulesetMimeFilter { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetMimeFilter; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetMimeFilter = value ?? null /* model class */; } + + /// Internal Acessors for RulesetTextMatching + ADT.Models.ITextMatchingRuleset ADT.Models.IFlowProfilePatchInternal.RulesetTextMatching { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetTextMatching; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetTextMatching = value ?? null /* model class */; } + + /// Internal Acessors for RulesetXmlFilter + ADT.Models.IXmlFilterRuleset ADT.Models.IFlowProfilePatchInternal.RulesetXmlFilter { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetXmlFilter; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).RulesetXmlFilter = value ?? null /* model class */; } + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AntivirusAvSolution { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).AntivirusAvSolution; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).AntivirusAvSolution = value ?? null /* arrayOf */; } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public double? ArchiveMaximumCompressionRatioLimit { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumCompressionRatioLimit; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumCompressionRatioLimit = value ?? default(double); } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumDepthLimit { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumDepthLimit; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumDepthLimit = value ?? default(long); } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumExpansionSizeLimit { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumExpansionSizeLimit; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMaximumExpansionSizeLimit = value ?? default(long); } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMinimumSizeForExpansion { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMinimumSizeForExpansion; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ArchiveMinimumSizeForExpansion = value ?? default(long); } + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMaximum { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).DataSizeMaximum; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).DataSizeMaximum = value ?? default(long); } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMinimum { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).DataSizeMinimum; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).DataSizeMinimum = value ?? default(long); } + + /// A description of the FlowProfile that defines the replication scenario. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string Description { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Description; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Description = value ?? null; } + + /// Backing field for property. + private ADT.Models.IManagedServiceIdentity _identity; + + /// The managed service identities assigned to this resource. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new ADT.Models.ManagedServiceIdentity()); set => this._identity = value; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string IdentityType { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).Type; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).Type = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((ADT.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((ADT.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MimeFilter { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).MimeFilter; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).MimeFilter = value ?? null /* arrayOf */; } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MimeFilterType { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).MimeFilterType; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).MimeFilterType = value ?? null; } + + /// Backing field for property. + private ADT.Models.IFlowProfilePatchProperties _property; + + /// Properties of FlowProfile patch body. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfilePatchProperties Property { get => (this._property = this._property ?? new ADT.Models.FlowProfilePatchProperties()); set => this._property = value; } + + /// The current provisioning state of the FlowProfile resource. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string ProvisioningState { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).ProvisioningState; } + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string Status { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Status; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).Status = value ?? null; } + + /// Backing field for property. + private ADT.Models.IFlowProfilePatchTags _tag; + + /// Resource tags. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public ADT.Models.IFlowProfilePatchTags Tag { get => (this._tag = this._tag ?? new ADT.Models.FlowProfilePatchTags()); set => this._tag = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TextMatchingDeny { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).TextMatchingDeny; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).TextMatchingDeny = value ?? null /* arrayOf */; } + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterDefaultNamespace { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterDefaultNamespace; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterDefaultNamespace = value ?? null; } + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterReference { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterReference; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterReference = value ?? null; } + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterSchema { get => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterSchema; set => ((ADT.Models.IFlowProfilePatchPropertiesInternal)Property).XmlFilterSchema = value ?? null; } + + /// Creates an new instance. + public FlowProfilePatch() + { + + } + } + /// Defines the patchable properties for a FlowProfile resource. + public partial interface IFlowProfilePatch : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMinimum { get; set; } + /// A description of the FlowProfile that defines the replication scenario. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description of the FlowProfile that defines the replication scenario.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile resource. + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of the FlowProfile resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// Resource tags. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfilePatchTags) })] + ADT.Models.IFlowProfilePatchTags Tag { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterSchema { get; set; } + + } + /// Defines the patchable properties for a FlowProfile resource. + internal partial interface IFlowProfilePatchInternal + + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? DataSizeMinimum { get; set; } + /// A description of the FlowProfile that defines the replication scenario. + string Description { get; set; } + /// The managed service identities assigned to this resource. + ADT.Models.IManagedServiceIdentity Identity { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityPrincipalId { get; set; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityTenantId { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// Properties of FlowProfile patch body. + ADT.Models.IFlowProfilePatchProperties Property { get; set; } + /// The current provisioning state of the FlowProfile resource. + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; set; } + /// A set of configurable rulesets applied to this FlowProfile. + ADT.Models.IFlowProfileRulesets Ruleset { get; set; } + /// Antivirus scanning rules for replicated data. + ADT.Models.IAntivirusRuleset RulesetAntiviru { get; set; } + /// Rules for handling archive files during replication. + ADT.Models.IArchiveRuleset RulesetArchive { get; set; } + /// Rules that enforce minimum and maximum data size limits. + ADT.Models.IDataSizeRuleset RulesetDataSize { get; set; } + /// Rules for filtering files based on MIME types. + ADT.Models.IMimeFilterRuleset RulesetMimeFilter { get; set; } + /// Rules for detecting and blocking specific text patterns. + ADT.Models.ITextMatchingRuleset RulesetTextMatching { get; set; } + /// Rules for filtering XML content using XSD schemas. + ADT.Models.IXmlFilterRuleset RulesetXmlFilter { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// Resource tags. + ADT.Models.IFlowProfilePatchTags Tag { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + string XmlFilterSchema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.json.cs new file mode 100644 index 000000000000..884e847c440f --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatch.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Defines the patchable properties for a FlowProfile resource. + public partial class FlowProfilePatch + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfilePatch(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? ADT.Models.FlowProfilePatchProperties.FromJson(__jsonProperties) : _property;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? ADT.Models.ManagedServiceIdentity.FromJson(__jsonIdentity) : _identity;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? ADT.Models.FlowProfilePatchTags.FromJson(__jsonTags) : _tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfilePatch. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfilePatch. + public static ADT.Models.IFlowProfilePatch FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfilePatch(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (ADT.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._identity ? (ADT.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + AddIf( null != this._tag ? (ADT.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.PowerShell.cs new file mode 100644 index 000000000000..6d0e9818856d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.PowerShell.cs @@ -0,0 +1,336 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Represents the updatable properties of a FlowProfile. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePatchPropertiesTypeConverter))] + public partial class FlowProfilePatchProperties + { + + /// + /// 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 ADT.Models.IFlowProfilePatchProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfilePatchProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfilePatchProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfilePatchProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfilePatchProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlowProfilePatchProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePatchPropertiesInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePatchPropertiesInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.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 ADT.Models.IFlowProfilePatchProperties FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Represents the updatable properties of a FlowProfile. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePatchPropertiesTypeConverter))] + public partial interface IFlowProfilePatchProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.TypeConverter.cs new file mode 100644 index 000000000000..a1aac1003feb --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfilePatchPropertiesTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfilePatchProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfilePatchProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfilePatchProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfilePatchProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfilePatchProperties.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.cs new file mode 100644 index 000000000000..2421fbb63803 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.cs @@ -0,0 +1,454 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Represents the updatable properties of a FlowProfile. + public partial class FlowProfilePatchProperties : + ADT.Models.IFlowProfilePatchProperties, + ADT.Models.IFlowProfilePatchPropertiesInternal + { + + /// Internal Acessors for ProvisioningState + string ADT.Models.IFlowProfilePatchPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Ruleset + ADT.Models.IFlowProfileRulesets ADT.Models.IFlowProfilePatchPropertiesInternal.Ruleset { get => (this._ruleset = this._ruleset ?? new ADT.Models.FlowProfileRulesets()); set { {_ruleset = value;} } } + + /// Internal Acessors for RulesetAntiviru + ADT.Models.IAntivirusRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetAntiviru { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Antiviru; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Antiviru = value ?? null /* model class */; } + + /// Internal Acessors for RulesetArchive + ADT.Models.IArchiveRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetArchive { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Archive; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Archive = value ?? null /* model class */; } + + /// Internal Acessors for RulesetDataSize + ADT.Models.IDataSizeRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetDataSize { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSize; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSize = value ?? null /* model class */; } + + /// Internal Acessors for RulesetMimeFilter + ADT.Models.IMimeFilterRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetMimeFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilter; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilter = value ?? null /* model class */; } + + /// Internal Acessors for RulesetTextMatching + ADT.Models.ITextMatchingRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetTextMatching { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatching; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatching = value ?? null /* model class */; } + + /// Internal Acessors for RulesetXmlFilter + ADT.Models.IXmlFilterRuleset ADT.Models.IFlowProfilePatchPropertiesInternal.RulesetXmlFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilter; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilter = value ?? null /* model class */; } + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AntivirusAvSolution { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).AntivirusAvSolution; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).AntivirusAvSolution = value ?? null /* arrayOf */; } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public double? ArchiveMaximumCompressionRatioLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumCompressionRatioLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumCompressionRatioLimit = value ?? default(double); } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumDepthLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumDepthLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumDepthLimit = value ?? default(long); } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumExpansionSizeLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumExpansionSizeLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumExpansionSizeLimit = value ?? default(long); } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMinimumSizeForExpansion { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMinimumSizeForExpansion; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMinimumSizeForExpansion = value ?? default(long); } + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMaximum { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMaximum; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMaximum = value ?? default(long); } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMinimum { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMinimum; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMinimum = value ?? default(long); } + + /// Backing field for property. + private string _description; + + /// A description of the FlowProfile that defines the replication scenario. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MimeFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterFilters; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterFilters = value ?? null /* arrayOf */; } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MimeFilterType { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterType; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterType = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// The current provisioning state of the FlowProfile resource. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private ADT.Models.IFlowProfileRulesets _ruleset; + + /// A set of configurable rulesets applied to this FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfileRulesets Ruleset { get => (this._ruleset = this._ruleset ?? new ADT.Models.FlowProfileRulesets()); set => this._ruleset = value; } + + /// Backing field for property. + private string _status; + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TextMatchingDeny { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatchingDeny; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatchingDeny = value ?? null /* arrayOf */; } + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterDefaultNamespace { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterDefaultNamespace; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterDefaultNamespace = value ?? null; } + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterReference { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterReference; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterReference = value ?? null; } + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterSchema { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterSchema; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterSchema = value ?? null; } + + /// Creates an new instance. + public FlowProfilePatchProperties() + { + + } + } + /// Represents the updatable properties of a FlowProfile. + public partial interface IFlowProfilePatchProperties : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMinimum { get; set; } + /// A description of the FlowProfile that defines the replication scenario. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A description of the FlowProfile that defines the replication scenario.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile resource. + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of the FlowProfile resource.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterSchema { get; set; } + + } + /// Represents the updatable properties of a FlowProfile. + internal partial interface IFlowProfilePatchPropertiesInternal + + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? DataSizeMinimum { get; set; } + /// A description of the FlowProfile that defines the replication scenario. + string Description { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile resource. + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; set; } + /// A set of configurable rulesets applied to this FlowProfile. + ADT.Models.IFlowProfileRulesets Ruleset { get; set; } + /// Antivirus scanning rules for replicated data. + ADT.Models.IAntivirusRuleset RulesetAntiviru { get; set; } + /// Rules for handling archive files during replication. + ADT.Models.IArchiveRuleset RulesetArchive { get; set; } + /// Rules that enforce minimum and maximum data size limits. + ADT.Models.IDataSizeRuleset RulesetDataSize { get; set; } + /// Rules for filtering files based on MIME types. + ADT.Models.IMimeFilterRuleset RulesetMimeFilter { get; set; } + /// Rules for detecting and blocking specific text patterns. + ADT.Models.ITextMatchingRuleset RulesetTextMatching { get; set; } + /// Rules for filtering XML content using XSD schemas. + ADT.Models.IXmlFilterRuleset RulesetXmlFilter { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + string XmlFilterSchema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.json.cs new file mode 100644 index 000000000000..61efbb60748e --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchProperties.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Represents the updatable properties of a FlowProfile. + public partial class FlowProfilePatchProperties + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfilePatchProperties(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ruleset = If( json?.PropertyT("rulesets"), out var __jsonRulesets) ? ADT.Models.FlowProfileRulesets.FromJson(__jsonRulesets) : _ruleset;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfilePatchProperties. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfilePatchProperties. + public static ADT.Models.IFlowProfilePatchProperties FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfilePatchProperties(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._ruleset ? (ADT.Runtime.Json.JsonNode) this._ruleset.ToJson(null,serializationMode) : null, "rulesets" ,container.Add ); + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AddIf( null != (((object)this._description)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.PowerShell.cs new file mode 100644 index 000000000000..9660011e81cc --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.PowerShell.cs @@ -0,0 +1,156 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePatchTagsTypeConverter))] + public partial class FlowProfilePatchTags + { + + /// + /// 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 ADT.Models.IFlowProfilePatchTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfilePatchTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfilePatchTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfilePatchTags(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfilePatchTags(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 FlowProfilePatchTags(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); + } + + /// + /// 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 ADT.Models.IFlowProfilePatchTags FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(FlowProfilePatchTagsTypeConverter))] + public partial interface IFlowProfilePatchTags + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.TypeConverter.cs new file mode 100644 index 000000000000..91ebaf4b432d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfilePatchTagsTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfilePatchTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfilePatchTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfilePatchTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfilePatchTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfilePatchTags.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.cs new file mode 100644 index 000000000000..30e2f0995250 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Resource tags. + public partial class FlowProfilePatchTags : + ADT.Models.IFlowProfilePatchTags, + ADT.Models.IFlowProfilePatchTagsInternal + { + + /// Creates an new instance. + public FlowProfilePatchTags() + { + + } + } + /// Resource tags. + public partial interface IFlowProfilePatchTags : + ADT.Runtime.IJsonSerializable, + ADT.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IFlowProfilePatchTagsInternal + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.dictionary.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.dictionary.cs new file mode 100644 index 000000000000..750d118216ce --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + public partial class FlowProfilePatchTags : + ADT.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary ADT.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int ADT.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable ADT.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable ADT.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 ADT.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 ADT.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(ADT.Models.FlowProfilePatchTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.json.cs new file mode 100644 index 000000000000..af9da1f61501 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfilePatchTags.json.cs @@ -0,0 +1,107 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Resource tags. + public partial class FlowProfilePatchTags + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + /// + internal FlowProfilePatchTags(ADT.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + ADT.Runtime.JsonSerializable.FromJson( json, ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfilePatchTags. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfilePatchTags. + public static ADT.Models.IFlowProfilePatchTags FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfilePatchTags(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + ADT.Runtime.JsonSerializable.ToJson( ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.PowerShell.cs new file mode 100644 index 000000000000..9b9661bfeedc --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.PowerShell.cs @@ -0,0 +1,352 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Defines the full set of properties for a FlowProfile resource. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePropertiesTypeConverter))] + public partial class FlowProfileProperties + { + + /// + /// 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 ADT.Models.IFlowProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfileProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfileProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfileProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePropertiesInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfilePropertiesInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfilePropertiesInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePropertiesInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePropertiesInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlowProfileProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ruleset")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Ruleset = (ADT.Models.IFlowProfileRulesets) content.GetValueForProperty("Ruleset",((ADT.Models.IFlowProfilePropertiesInternal)this).Ruleset, ADT.Models.FlowProfileRulesetsTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((ADT.Models.IFlowProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowProfilePropertiesInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("ReplicationScenario")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ReplicationScenario = (string) content.GetValueForProperty("ReplicationScenario",((ADT.Models.IFlowProfilePropertiesInternal)this).ReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("Status")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IFlowProfilePropertiesInternal)this).Status, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((ADT.Models.IFlowProfilePropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("RulesetAntiviru")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetAntiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("RulesetAntiviru",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetAntiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetArchive")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetArchive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("RulesetArchive",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetArchive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetDataSize")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetDataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("RulesetDataSize",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetDataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetMimeFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetMimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("RulesetMimeFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetMimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetXmlFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetXmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("RulesetXmlFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetXmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("RulesetTextMatching")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetTextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("RulesetTextMatching",((ADT.Models.IFlowProfilePropertiesInternal)this).RulesetTextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfilePropertiesInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfilePropertiesInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfilePropertiesInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilter = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfilePropertiesInternal)this).MimeFilter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfilePropertiesInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfilePropertiesInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfilePropertiesInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.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 ADT.Models.IFlowProfileProperties FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// Defines the full set of properties for a FlowProfile resource. + [System.ComponentModel.TypeConverter(typeof(FlowProfilePropertiesTypeConverter))] + public partial interface IFlowProfileProperties + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.TypeConverter.cs new file mode 100644 index 000000000000..cefc9cae1b9e --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfilePropertiesTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfileProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfileProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfileProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfileProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfileProperties.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.cs new file mode 100644 index 000000000000..f5b78f7f530a --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.cs @@ -0,0 +1,511 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Defines the full set of properties for a FlowProfile resource. + public partial class FlowProfileProperties : + ADT.Models.IFlowProfileProperties, + ADT.Models.IFlowProfilePropertiesInternal + { + + /// Internal Acessors for FlowProfileId + string ADT.Models.IFlowProfilePropertiesInternal.FlowProfileId { get => this._flowProfileId; set { {_flowProfileId = value;} } } + + /// Internal Acessors for ProvisioningState + string ADT.Models.IFlowProfilePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Ruleset + ADT.Models.IFlowProfileRulesets ADT.Models.IFlowProfilePropertiesInternal.Ruleset { get => (this._ruleset = this._ruleset ?? new ADT.Models.FlowProfileRulesets()); set { {_ruleset = value;} } } + + /// Internal Acessors for RulesetAntiviru + ADT.Models.IAntivirusRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetAntiviru { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Antiviru; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Antiviru = value ?? null /* model class */; } + + /// Internal Acessors for RulesetArchive + ADT.Models.IArchiveRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetArchive { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Archive; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).Archive = value ?? null /* model class */; } + + /// Internal Acessors for RulesetDataSize + ADT.Models.IDataSizeRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetDataSize { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSize; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSize = value ?? null /* model class */; } + + /// Internal Acessors for RulesetMimeFilter + ADT.Models.IMimeFilterRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetMimeFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilter; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilter = value ?? null /* model class */; } + + /// Internal Acessors for RulesetTextMatching + ADT.Models.ITextMatchingRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetTextMatching { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatching; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatching = value ?? null /* model class */; } + + /// Internal Acessors for RulesetXmlFilter + ADT.Models.IXmlFilterRuleset ADT.Models.IFlowProfilePropertiesInternal.RulesetXmlFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilter; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilter = value ?? null /* model class */; } + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AntivirusAvSolution { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).AntivirusAvSolution; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).AntivirusAvSolution = value ?? null /* arrayOf */; } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public double? ArchiveMaximumCompressionRatioLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumCompressionRatioLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumCompressionRatioLimit = value ?? default(double); } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumDepthLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumDepthLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumDepthLimit = value ?? default(long); } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumExpansionSizeLimit { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumExpansionSizeLimit; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMaximumExpansionSizeLimit = value ?? default(long); } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMinimumSizeForExpansion { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMinimumSizeForExpansion; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).ArchiveMinimumSizeForExpansion = value ?? default(long); } + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMaximum { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMaximum; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMaximum = value ?? default(long); } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMinimum { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMinimum; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).DataSizeMinimum = value ?? default(long); } + + /// Backing field for property. + private string _description; + + /// A user-defined description of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _flowProfileId; + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string FlowProfileId { get => this._flowProfileId; } + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MimeFilter { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterFilters; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterFilters = value ?? null /* arrayOf */; } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MimeFilterType { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterType; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).MimeFilterType = value ?? null; } + + /// Backing field for property. + private string _provisioningState; + + /// The current provisioning state of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _replicationScenario; + + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ReplicationScenario { get => this._replicationScenario; set => this._replicationScenario = value; } + + /// Backing field for property. + private ADT.Models.IFlowProfileRulesets _ruleset; + + /// A set of configurable rulesets applied to this FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfileRulesets Ruleset { get => (this._ruleset = this._ruleset ?? new ADT.Models.FlowProfileRulesets()); set => this._ruleset = value; } + + /// Backing field for property. + private string _status; + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Status { get => this._status; set => this._status = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TextMatchingDeny { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatchingDeny; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).TextMatchingDeny = value ?? null /* arrayOf */; } + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterDefaultNamespace { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterDefaultNamespace; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterDefaultNamespace = value ?? null; } + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterReference { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterReference; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterReference = value ?? null; } + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterSchema { get => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterSchema; set => ((ADT.Models.IFlowProfileRulesetsInternal)Ruleset).XmlFilterSchema = value ?? null; } + + /// Creates an new instance. + public FlowProfileProperties() + { + + } + } + /// Defines the full set of properties for a FlowProfile resource. + public partial interface IFlowProfileProperties : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMinimum { get; set; } + /// A user-defined description of the FlowProfile. + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A user-defined description of the FlowProfile.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileId { get; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The current provisioning state of the FlowProfile.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; } + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterSchema { get; set; } + + } + /// Defines the full set of properties for a FlowProfile resource. + internal partial interface IFlowProfilePropertiesInternal + + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? DataSizeMinimum { get; set; } + /// A user-defined description of the FlowProfile. + string Description { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string FlowProfileId { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List MimeFilter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// The current provisioning state of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] + string ProvisioningState { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string ReplicationScenario { get; set; } + /// A set of configurable rulesets applied to this FlowProfile. + ADT.Models.IFlowProfileRulesets Ruleset { get; set; } + /// Antivirus scanning rules for replicated data. + ADT.Models.IAntivirusRuleset RulesetAntiviru { get; set; } + /// Rules for handling archive files during replication. + ADT.Models.IArchiveRuleset RulesetArchive { get; set; } + /// Rules that enforce minimum and maximum data size limits. + ADT.Models.IDataSizeRuleset RulesetDataSize { get; set; } + /// Rules for filtering files based on MIME types. + ADT.Models.IMimeFilterRuleset RulesetMimeFilter { get; set; } + /// Rules for detecting and blocking specific text patterns. + ADT.Models.ITextMatchingRuleset RulesetTextMatching { get; set; } + /// Rules for filtering XML content using XSD schemas. + ADT.Models.IXmlFilterRuleset RulesetXmlFilter { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string Status { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + string XmlFilterSchema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.json.cs new file mode 100644 index 000000000000..6bf90b68b74b --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileProperties.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Defines the full set of properties for a FlowProfile resource. + public partial class FlowProfileProperties + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfileProperties(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ruleset = If( json?.PropertyT("rulesets"), out var __jsonRulesets) ? ADT.Models.FlowProfileRulesets.FromJson(__jsonRulesets) : _ruleset;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} + {_flowProfileId = If( json?.PropertyT("flowProfileId"), out var __jsonFlowProfileId) ? (string)__jsonFlowProfileId : (string)_flowProfileId;} + {_replicationScenario = If( json?.PropertyT("replicationScenario"), out var __jsonReplicationScenario) ? (string)__jsonReplicationScenario : (string)_replicationScenario;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)_description;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfileProperties. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfileProperties. + public static ADT.Models.IFlowProfileProperties FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfileProperties(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._ruleset ? (ADT.Runtime.Json.JsonNode) this._ruleset.ToJson(null,serializationMode) : null, "rulesets" ,container.Add ); + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._flowProfileId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowProfileId.ToString()) : null, "flowProfileId" ,container.Add ); + } + AddIf( null != (((object)this._replicationScenario)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._replicationScenario.ToString()) : null, "replicationScenario" ,container.Add ); + AddIf( null != (((object)this._status)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.PowerShell.cs new file mode 100644 index 000000000000..1ae5dbecb81e --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.PowerShell.cs @@ -0,0 +1,312 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + /// + [System.ComponentModel.TypeConverter(typeof(FlowProfileRulesetsTypeConverter))] + public partial class FlowProfileRulesets + { + + /// + /// 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 ADT.Models.IFlowProfileRulesets DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlowProfileRulesets(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IFlowProfileRulesets DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlowProfileRulesets(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlowProfileRulesets(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Antiviru")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).Antiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("Antiviru",((ADT.Models.IFlowProfileRulesetsInternal)this).Antiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("Archive")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).Archive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("Archive",((ADT.Models.IFlowProfileRulesetsInternal)this).Archive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("DataSize")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("DataSize",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("XmlFilter")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("XmlFilter",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("TextMatching")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("TextMatching",((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfileRulesetsInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilterFilters")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterFilters = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilterFilters",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterFilters, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlowProfileRulesets(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Antiviru")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).Antiviru = (ADT.Models.IAntivirusRuleset) content.GetValueForProperty("Antiviru",((ADT.Models.IFlowProfileRulesetsInternal)this).Antiviru, ADT.Models.AntivirusRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("Archive")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).Archive = (ADT.Models.IArchiveRuleset) content.GetValueForProperty("Archive",((ADT.Models.IFlowProfileRulesetsInternal)this).Archive, ADT.Models.ArchiveRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("DataSize")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSize = (ADT.Models.IDataSizeRuleset) content.GetValueForProperty("DataSize",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSize, ADT.Models.DataSizeRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("MimeFilter")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilter = (ADT.Models.IMimeFilterRuleset) content.GetValueForProperty("MimeFilter",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilter, ADT.Models.MimeFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("XmlFilter")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilter = (ADT.Models.IXmlFilterRuleset) content.GetValueForProperty("XmlFilter",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilter, ADT.Models.XmlFilterRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("TextMatching")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatching = (ADT.Models.ITextMatchingRuleset) content.GetValueForProperty("TextMatching",((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatching, ADT.Models.TextMatchingRulesetTypeConverter.ConvertFrom); + } + if (content.Contains("AntivirusAvSolution")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).AntivirusAvSolution = (System.Collections.Generic.List) content.GetValueForProperty("AntivirusAvSolution",((ADT.Models.IFlowProfileRulesetsInternal)this).AntivirusAvSolution, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } + if (content.Contains("ArchiveMinimumSizeForExpansion")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMinimumSizeForExpansion = (long?) content.GetValueForProperty("ArchiveMinimumSizeForExpansion",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMinimumSizeForExpansion, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumExpansionSizeLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumExpansionSizeLimit = (long?) content.GetValueForProperty("ArchiveMaximumExpansionSizeLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumExpansionSizeLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumDepthLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumDepthLimit = (long?) content.GetValueForProperty("ArchiveMaximumDepthLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumDepthLimit, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("ArchiveMaximumCompressionRatioLimit")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumCompressionRatioLimit = (double?) content.GetValueForProperty("ArchiveMaximumCompressionRatioLimit",((ADT.Models.IFlowProfileRulesetsInternal)this).ArchiveMaximumCompressionRatioLimit, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DataSizeMaximum")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMaximum = (long?) content.GetValueForProperty("DataSizeMaximum",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMaximum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("DataSizeMinimum")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMinimum = (long?) content.GetValueForProperty("DataSizeMinimum",((ADT.Models.IFlowProfileRulesetsInternal)this).DataSizeMinimum, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("MimeFilterType")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterType = (string) content.GetValueForProperty("MimeFilterType",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterType, global::System.Convert.ToString); + } + if (content.Contains("MimeFilterFilters")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterFilters = (System.Collections.Generic.List) content.GetValueForProperty("MimeFilterFilters",((ADT.Models.IFlowProfileRulesetsInternal)this).MimeFilterFilters, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + if (content.Contains("XmlFilterDefaultNamespace")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterDefaultNamespace = (string) content.GetValueForProperty("XmlFilterDefaultNamespace",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterDefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterReference")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterReference = (string) content.GetValueForProperty("XmlFilterReference",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterReference, global::System.Convert.ToString); + } + if (content.Contains("XmlFilterSchema")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterSchema = (string) content.GetValueForProperty("XmlFilterSchema",((ADT.Models.IFlowProfileRulesetsInternal)this).XmlFilterSchema, global::System.Convert.ToString); + } + if (content.Contains("TextMatchingDeny")) + { + ((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatchingDeny = (System.Collections.Generic.List) content.GetValueForProperty("TextMatchingDeny",((ADT.Models.IFlowProfileRulesetsInternal)this).TextMatchingDeny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.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 ADT.Models.IFlowProfileRulesets FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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(); + } + } + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + [System.ComponentModel.TypeConverter(typeof(FlowProfileRulesetsTypeConverter))] + public partial interface IFlowProfileRulesets + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.TypeConverter.cs new file mode 100644 index 000000000000..39f09d298c20 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlowProfileRulesetsTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IFlowProfileRulesets ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IFlowProfileRulesets).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlowProfileRulesets.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlowProfileRulesets.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlowProfileRulesets.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.cs new file mode 100644 index 000000000000..1dacbce89edb --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.cs @@ -0,0 +1,428 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + /// + public partial class FlowProfileRulesets : + ADT.Models.IFlowProfileRulesets, + ADT.Models.IFlowProfileRulesetsInternal + { + + /// Internal Acessors for Antiviru + ADT.Models.IAntivirusRuleset ADT.Models.IFlowProfileRulesetsInternal.Antiviru { get => (this._antiviru = this._antiviru ?? new ADT.Models.AntivirusRuleset()); set { {_antiviru = value;} } } + + /// Internal Acessors for Archive + ADT.Models.IArchiveRuleset ADT.Models.IFlowProfileRulesetsInternal.Archive { get => (this._archive = this._archive ?? new ADT.Models.ArchiveRuleset()); set { {_archive = value;} } } + + /// Internal Acessors for DataSize + ADT.Models.IDataSizeRuleset ADT.Models.IFlowProfileRulesetsInternal.DataSize { get => (this._dataSize = this._dataSize ?? new ADT.Models.DataSizeRuleset()); set { {_dataSize = value;} } } + + /// Internal Acessors for MimeFilter + ADT.Models.IMimeFilterRuleset ADT.Models.IFlowProfileRulesetsInternal.MimeFilter { get => (this._mimeFilter = this._mimeFilter ?? new ADT.Models.MimeFilterRuleset()); set { {_mimeFilter = value;} } } + + /// Internal Acessors for TextMatching + ADT.Models.ITextMatchingRuleset ADT.Models.IFlowProfileRulesetsInternal.TextMatching { get => (this._textMatching = this._textMatching ?? new ADT.Models.TextMatchingRuleset()); set { {_textMatching = value;} } } + + /// Internal Acessors for XmlFilter + ADT.Models.IXmlFilterRuleset ADT.Models.IFlowProfileRulesetsInternal.XmlFilter { get => (this._xmlFilter = this._xmlFilter ?? new ADT.Models.XmlFilterRuleset()); set { {_xmlFilter = value;} } } + + /// Backing field for property. + private ADT.Models.IAntivirusRuleset _antiviru; + + /// Antivirus scanning rules for replicated data. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IAntivirusRuleset Antiviru { get => (this._antiviru = this._antiviru ?? new ADT.Models.AntivirusRuleset()); set => this._antiviru = value; } + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List AntivirusAvSolution { get => ((ADT.Models.IAntivirusRulesetInternal)Antiviru).AvSolution; set => ((ADT.Models.IAntivirusRulesetInternal)Antiviru).AvSolution = value ?? null /* arrayOf */; } + + /// Backing field for property. + private ADT.Models.IArchiveRuleset _archive; + + /// Rules for handling archive files during replication. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IArchiveRuleset Archive { get => (this._archive = this._archive ?? new ADT.Models.ArchiveRuleset()); set => this._archive = value; } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public double? ArchiveMaximumCompressionRatioLimit { get => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumCompressionRatioLimit; set => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumCompressionRatioLimit = value ?? default(double); } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumDepthLimit { get => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumDepthLimit; set => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumDepthLimit = value ?? default(long); } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMaximumExpansionSizeLimit { get => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumExpansionSizeLimit; set => ((ADT.Models.IArchiveRulesetInternal)Archive).MaximumExpansionSizeLimit = value ?? default(long); } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? ArchiveMinimumSizeForExpansion { get => ((ADT.Models.IArchiveRulesetInternal)Archive).MinimumSizeForExpansion; set => ((ADT.Models.IArchiveRulesetInternal)Archive).MinimumSizeForExpansion = value ?? default(long); } + + /// Backing field for property. + private ADT.Models.IDataSizeRuleset _dataSize; + + /// Rules that enforce minimum and maximum data size limits. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IDataSizeRuleset DataSize { get => (this._dataSize = this._dataSize ?? new ADT.Models.DataSizeRuleset()); set => this._dataSize = value; } + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMaximum { get => ((ADT.Models.IDataSizeRulesetInternal)DataSize).Maximum; set => ((ADT.Models.IDataSizeRulesetInternal)DataSize).Maximum = value ?? default(long); } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public long? DataSizeMinimum { get => ((ADT.Models.IDataSizeRulesetInternal)DataSize).Minimum; set => ((ADT.Models.IDataSizeRulesetInternal)DataSize).Minimum = value ?? default(long); } + + /// Backing field for property. + private ADT.Models.IMimeFilterRuleset _mimeFilter; + + /// Rules for filtering files based on MIME types. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IMimeFilterRuleset MimeFilter { get => (this._mimeFilter = this._mimeFilter ?? new ADT.Models.MimeFilterRuleset()); set => this._mimeFilter = value; } + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List MimeFilterFilters { get => ((ADT.Models.IMimeFilterRulesetInternal)MimeFilter).Filter; set => ((ADT.Models.IMimeFilterRulesetInternal)MimeFilter).Filter = value ?? null /* arrayOf */; } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MimeFilterType { get => ((ADT.Models.IMimeFilterRulesetInternal)MimeFilter).Type; set => ((ADT.Models.IMimeFilterRulesetInternal)MimeFilter).Type = value ?? null; } + + /// Backing field for property. + private ADT.Models.ITextMatchingRuleset _textMatching; + + /// Rules for detecting and blocking specific text patterns. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.ITextMatchingRuleset TextMatching { get => (this._textMatching = this._textMatching ?? new ADT.Models.TextMatchingRuleset()); set => this._textMatching = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List TextMatchingDeny { get => ((ADT.Models.ITextMatchingRulesetInternal)TextMatching).Deny; set => ((ADT.Models.ITextMatchingRulesetInternal)TextMatching).Deny = value ?? null /* arrayOf */; } + + /// Backing field for property. + private ADT.Models.IXmlFilterRuleset _xmlFilter; + + /// Rules for filtering XML content using XSD schemas. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IXmlFilterRuleset XmlFilter { get => (this._xmlFilter = this._xmlFilter ?? new ADT.Models.XmlFilterRuleset()); set => this._xmlFilter = value; } + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterDefaultNamespace { get => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).DefaultNamespace; set => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).DefaultNamespace = value ?? null; } + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterReference { get => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).Reference; set => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).Reference = value ?? null; } + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string XmlFilterSchema { get => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).Schema; set => ((ADT.Models.IXmlFilterRulesetInternal)XmlFilter).Schema = value ?? null; } + + /// Creates an new instance. + public FlowProfileRulesets() + { + + } + } + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + public partial interface IFlowProfileRulesets : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + long? ArchiveMinimumSizeForExpansion { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + long? DataSizeMinimum { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List MimeFilterFilters { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string XmlFilterSchema { get; set; } + + } + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + internal partial interface IFlowProfileRulesetsInternal + + { + /// Antivirus scanning rules for replicated data. + ADT.Models.IAntivirusRuleset Antiviru { get; set; } + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + System.Collections.Generic.List AntivirusAvSolution { get; set; } + /// Rules for handling archive files during replication. + ADT.Models.IArchiveRuleset Archive { get; set; } + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + double? ArchiveMaximumCompressionRatioLimit { get; set; } + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumDepthLimit { get; set; } + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + long? ArchiveMaximumExpansionSizeLimit { get; set; } + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + long? ArchiveMinimumSizeForExpansion { get; set; } + /// Rules that enforce minimum and maximum data size limits. + ADT.Models.IDataSizeRuleset DataSize { get; set; } + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + long? DataSizeMaximum { get; set; } + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + long? DataSizeMinimum { get; set; } + /// Rules for filtering files based on MIME types. + ADT.Models.IMimeFilterRuleset MimeFilter { get; set; } + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List MimeFilterFilters { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string MimeFilterType { get; set; } + /// Rules for detecting and blocking specific text patterns. + ADT.Models.ITextMatchingRuleset TextMatching { get; set; } + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List TextMatchingDeny { get; set; } + /// Rules for filtering XML content using XSD schemas. + ADT.Models.IXmlFilterRuleset XmlFilter { get; set; } + /// The default XML namespace used for schema validation. + string XmlFilterDefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string XmlFilterReference { get; set; } + /// The inline XSD schema to be used for validation. + string XmlFilterSchema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.json.cs new file mode 100644 index 000000000000..dc35a4427caf --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProfileRulesets.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// The allowed set of configurable rulesets for a FlowProfile resource, used during data replication. All rulesets are optional, + /// and any ruleset configured will be applied to every applicable replicating data. Any data that fails a ruleset will be + /// denied replication. If a ruleset is not configured then the ruleset is considered disabled and will not apply towards + /// replicating data. + /// + public partial class FlowProfileRulesets + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal FlowProfileRulesets(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_antiviru = If( json?.PropertyT("antivirus"), out var __jsonAntivirus) ? ADT.Models.AntivirusRuleset.FromJson(__jsonAntivirus) : _antiviru;} + {_archive = If( json?.PropertyT("archives"), out var __jsonArchives) ? ADT.Models.ArchiveRuleset.FromJson(__jsonArchives) : _archive;} + {_dataSize = If( json?.PropertyT("dataSize"), out var __jsonDataSize) ? ADT.Models.DataSizeRuleset.FromJson(__jsonDataSize) : _dataSize;} + {_mimeFilter = If( json?.PropertyT("mimeFilters"), out var __jsonMimeFilters) ? ADT.Models.MimeFilterRuleset.FromJson(__jsonMimeFilters) : _mimeFilter;} + {_xmlFilter = If( json?.PropertyT("xmlFilters"), out var __jsonXmlFilters) ? ADT.Models.XmlFilterRuleset.FromJson(__jsonXmlFilters) : _xmlFilter;} + {_textMatching = If( json?.PropertyT("textMatching"), out var __jsonTextMatching) ? ADT.Models.TextMatchingRuleset.FromJson(__jsonTextMatching) : _textMatching;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of ADT.Models.IFlowProfileRulesets. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IFlowProfileRulesets. + public static ADT.Models.IFlowProfileRulesets FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new FlowProfileRulesets(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._antiviru ? (ADT.Runtime.Json.JsonNode) this._antiviru.ToJson(null,serializationMode) : null, "antivirus" ,container.Add ); + AddIf( null != this._archive ? (ADT.Runtime.Json.JsonNode) this._archive.ToJson(null,serializationMode) : null, "archives" ,container.Add ); + AddIf( null != this._dataSize ? (ADT.Runtime.Json.JsonNode) this._dataSize.ToJson(null,serializationMode) : null, "dataSize" ,container.Add ); + AddIf( null != this._mimeFilter ? (ADT.Runtime.Json.JsonNode) this._mimeFilter.ToJson(null,serializationMode) : null, "mimeFilters" ,container.Add ); + AddIf( null != this._xmlFilter ? (ADT.Runtime.Json.JsonNode) this._xmlFilter.ToJson(null,serializationMode) : null, "xmlFilters" ,container.Add ); + AddIf( null != this._textMatching ? (ADT.Runtime.Json.JsonNode) this._textMatching.ToJson(null,serializationMode) : null, "textMatching" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.PowerShell.cs index 438f23f63b0f..bf73b64ee1bc 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.PowerShell.cs @@ -102,6 +102,10 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IFlowPropertiesInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("FlowProfile")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("FlowProfile",((ADT.Models.IFlowPropertiesInternal)this).FlowProfile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("Schema")) { ((ADT.Models.IFlowPropertiesInternal)this).Schema = (ADT.Models.ISchema) content.GetValueForProperty("Schema",((ADT.Models.IFlowPropertiesInternal)this).Schema, ADT.Models.SchemaTypeConverter.ConvertFrom); @@ -162,6 +166,10 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IFlowPropertiesInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IFlowPropertiesInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("FlowType")) { ((ADT.Models.IFlowPropertiesInternal)this).FlowType = (string) content.GetValueForProperty("FlowType",((ADT.Models.IFlowPropertiesInternal)this).FlowType, global::System.Convert.ToString); @@ -214,6 +222,10 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((ADT.Models.IFlowPropertiesInternal)this).ConsumerGroup, global::System.Convert.ToString); } + if (content.Contains("FlowProfileStatus")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileStatus = (string) content.GetValueForProperty("FlowProfileStatus",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IFlowPropertiesInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IFlowPropertiesInternal)this).SchemaId, global::System.Convert.ToString); @@ -266,6 +278,10 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IFlowPropertiesInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IFlowPropertiesInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -286,10 +302,38 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IFlowPropertiesInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("FlowProfilePipeline")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfilePipeline = (string) content.GetValueForProperty("FlowProfilePipeline",((ADT.Models.IFlowPropertiesInternal)this).FlowProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileName, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileReplicationScenario")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileReplicationScenario = (string) content.GetValueForProperty("FlowProfileReplicationScenario",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileDescription")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileDescription = (string) content.GetValueForProperty("FlowProfileDescription",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -298,6 +342,14 @@ internal FlowProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializeDictionary(content); } @@ -319,6 +371,10 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IFlowPropertiesInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("FlowProfile")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("FlowProfile",((ADT.Models.IFlowPropertiesInternal)this).FlowProfile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("Schema")) { ((ADT.Models.IFlowPropertiesInternal)this).Schema = (ADT.Models.ISchema) content.GetValueForProperty("Schema",((ADT.Models.IFlowPropertiesInternal)this).Schema, ADT.Models.SchemaTypeConverter.ConvertFrom); @@ -379,6 +435,10 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IFlowPropertiesInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IFlowPropertiesInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("FlowType")) { ((ADT.Models.IFlowPropertiesInternal)this).FlowType = (string) content.GetValueForProperty("FlowType",((ADT.Models.IFlowPropertiesInternal)this).FlowType, global::System.Convert.ToString); @@ -431,6 +491,10 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).ConsumerGroup = (string) content.GetValueForProperty("ConsumerGroup",((ADT.Models.IFlowPropertiesInternal)this).ConsumerGroup, global::System.Convert.ToString); } + if (content.Contains("FlowProfileStatus")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileStatus = (string) content.GetValueForProperty("FlowProfileStatus",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IFlowPropertiesInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IFlowPropertiesInternal)this).SchemaId, global::System.Convert.ToString); @@ -483,6 +547,10 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IFlowPropertiesInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IFlowPropertiesInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -503,10 +571,38 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IFlowPropertiesInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("FlowProfilePipeline")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfilePipeline = (string) content.GetValueForProperty("FlowProfilePipeline",((ADT.Models.IFlowPropertiesInternal)this).FlowProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileName, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileReplicationScenario")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileReplicationScenario = (string) content.GetValueForProperty("FlowProfileReplicationScenario",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileDescription")) + { + ((ADT.Models.IFlowPropertiesInternal)this).FlowProfileDescription = (string) content.GetValueForProperty("FlowProfileDescription",((ADT.Models.IFlowPropertiesInternal)this).FlowProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IFlowPropertiesInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -515,6 +611,14 @@ internal FlowProperties(global::System.Management.Automation.PSObject content) { ((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IFlowPropertiesInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IFlowPropertiesInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } AfterDeserializePSObject(content); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.cs index e6d3ebeace9e..b4079045d1d7 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.cs @@ -16,12 +16,18 @@ public partial class FlowProperties : /// Internal Acessors for ApiFlowOption ADT.Models.IApiFlowOptions ADT.Models.IFlowPropertiesInternal.ApiFlowOption { get => (this._apiFlowOption = this._apiFlowOption ?? new ADT.Models.ApiFlowOptions()); set { {_apiFlowOption = value;} } } + /// Internal Acessors for ApiFlowOptionRemoteEndpointSetting + ADT.Models.IRemoteEndpointSettings ADT.Models.IFlowPropertiesInternal.ApiFlowOptionRemoteEndpointSetting { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSetting; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSetting = value ?? null /* model class */; } + /// Internal Acessors for Connection ADT.Models.ISelectedResource ADT.Models.IFlowPropertiesInternal.Connection { get => (this._connection = this._connection ?? new ADT.Models.SelectedResource()); set { {_connection = value;} } } /// Internal Acessors for FlowId string ADT.Models.IFlowPropertiesInternal.FlowId { get => this._flowId; set { {_flowId = value;} } } + /// Internal Acessors for FlowProfile + ADT.Models.IFlowProfileMetadata ADT.Models.IFlowPropertiesInternal.FlowProfile { get => (this._flowProfile = this._flowProfile ?? new ADT.Models.FlowProfileMetadata()); set { {_flowProfile = value;} } } + /// Internal Acessors for ForceDisabledStatus System.Collections.Generic.List ADT.Models.IFlowPropertiesInternal.ForceDisabledStatus { get => this._forceDisabledStatus; set { {_forceDisabledStatus = value;} } } @@ -56,27 +62,49 @@ public partial class FlowProperties : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionApiMode { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).ApiMode; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).ApiMode = value ?? null; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionAudienceOverride { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).AudienceOverride; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).AudienceOverride = value ?? null; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ApiFlowOptionAuthentication { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Authentication; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Authentication = value ?? null /* arrayOf */; } + /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionCname { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Cname; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Cname = value ?? null; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionIdentityTranslation { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).IdentityTranslation; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).IdentityTranslation = value ?? null; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteCallingModeClientId { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteCallingModeClientId; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteCallingModeClientId = value ?? null; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteEndpoint { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpoint; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpoint = value ?? null; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionSenderClientId { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).SenderClientId; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).SenderClientId = value ?? null; } @@ -120,7 +148,10 @@ public partial class FlowProperties : /// Backing field for property. private string _dataType; - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string DataType { get => this._dataType; set => this._dataType = value; } @@ -145,6 +176,13 @@ public partial class FlowProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string EventHubId { get => this._eventHubId; set => this._eventHubId = value; } + /// Backing field for property. + private string _flowDataType; + + /// The Flow's data class. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string FlowDataType { get => this._flowDataType; set => this._flowDataType = value; } + /// Backing field for property. private string _flowId; @@ -152,10 +190,54 @@ public partial class FlowProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string FlowId { get => this._flowId; } + /// Backing field for property. + private ADT.Models.IFlowProfileMetadata _flowProfile; + + /// Type of FlowProfile to use for transfer via the flow. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfileMetadata FlowProfile { get => (this._flowProfile = this._flowProfile ?? new ADT.Models.FlowProfileMetadata()); set => this._flowProfile = value; } + + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileDescription { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Description; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Description = value ?? null; } + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileId { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).FlowProfileId; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).FlowProfileId = value ?? null; } + + /// The name of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileName { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Name; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Name = value ?? null; } + + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfilePipeline { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Pipeline; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Pipeline = value ?? null; } + + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileReplicationScenario { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).ReplicationScenario; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).ReplicationScenario = value ?? null; } + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileStatus { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Status; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Status = value ?? null; } + /// Backing field for property. private string _flowType; - /// The flow type for this flow + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string FlowType { get => this._flowType; set => this._flowType = value; } @@ -198,6 +280,13 @@ public partial class FlowProperties : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string MessagingOptionBillingTier { get => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).BillingTier; set => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).BillingTier = value ?? null; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MessagingOptionPerformancePriority { get => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).PerformancePriority; set => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).PerformancePriority = value ?? null; } + /// Backing field for property. private string _passphrase; @@ -208,7 +297,10 @@ public partial class FlowProperties : /// Backing field for property. private System.Collections.Generic.List _policy; - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } @@ -219,10 +311,24 @@ public partial class FlowProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string ProvisioningState { get => this._provisioningState; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List RemoteEndpointSettingAuthentication { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingAuthentication; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingAuthentication = value ?? null /* arrayOf */; } + + /// The remote endpoint uri all API calls. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string RemoteEndpointSettingEndpoint { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingEndpoint; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingEndpoint = value ?? null; } + /// Backing field for property. private ADT.Models.ISchema _schema; - /// The selected schema for this flow + /// + /// The selected schema for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] internal ADT.Models.ISchema Schema { get => (this._schema = this._schema ?? new ADT.Models.Schema()); set => this._schema = value; } @@ -356,17 +462,34 @@ public partial interface IFlowProperties : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Optional field to override the audience of the remote endpoint", + Description = @"Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"audienceOverride", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Runtime.Info( Required = false, @@ -378,48 +501,60 @@ public partial interface IFlowProperties : SerializedName = @"cname", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Flag for if Azure Data Transfer API Flow should extract the user token", + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"identityTranslation", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote stub app registration Client ID", + Description = @"Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"remoteCallingModeClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote host to which communication needs to be made", + Description = @"Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.", SerializedName = @"remoteEndpoint", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Sender's app user assigned Manage Identity client ID", + Description = @"Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"senderClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionSenderClientId { get; set; } @@ -489,14 +624,17 @@ public partial interface IFlowProperties : SerializedName = @"customerManagedKeyVaultUri", PossibleTypes = new [] { typeof(string) })] string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Type of data to transfer via the flow.", + Description = @"Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] @@ -534,6 +672,18 @@ public partial interface IFlowProperties : SerializedName = @"eventHubId", PossibleTypes = new [] { typeof(string) })] string EventHubId { get; set; } + /// The Flow's data class. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Flow's data class.", + SerializedName = @"flowDataType", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow [ADT.Runtime.Info( Required = false, @@ -545,14 +695,95 @@ public partial interface IFlowProperties : SerializedName = @"flowId", PossibleTypes = new [] { typeof(string) })] string FlowId { get; } - /// The flow type for this flow + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow type for this flow", + Description = @"A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the FlowProfile.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the parent Pipeline Azure resource associated with this FlowProfile.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + string FlowProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string FlowProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string FlowProfileStatus { get; set; } + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -567,7 +798,7 @@ public partial interface IFlowProperties : Description = @"Force disablement status of the current flow", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// URI to a Key Vault Secret containing a SAS token. [ADT.Runtime.Info( @@ -615,6 +846,21 @@ public partial interface IFlowProperties : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions", + SerializedName = @"performancePriority", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The passphrase used for SRT streams [ADT.Runtime.Info( Required = false, @@ -626,14 +872,17 @@ public partial interface IFlowProperties : SerializedName = @"passphrase", PossibleTypes = new [] { typeof(string) })] string Passphrase { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this flow", + Description = @"The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -649,6 +898,31 @@ public partial interface IFlowProperties : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string RemoteEndpointSettingEndpoint { get; set; } /// Connection ID associated with this schema [ADT.Runtime.Info( Required = false, @@ -865,18 +1139,40 @@ internal partial interface IFlowPropertiesInternal /// [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// Defines the destination remote endpoint for the API calls. + ADT.Models.IRemoteEndpointSettings ApiFlowOptionRemoteEndpointSetting { get; set; } + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionSenderClientId { get; set; } /// The connection associated with this flow ADT.Models.ISelectedResource Connection { get; set; } @@ -892,7 +1188,10 @@ internal partial interface IFlowPropertiesInternal string ConsumerGroup { get; set; } /// The URI to the customer managed key for this flow string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] string DataType { get; set; } /// The destination endpoints of the stream @@ -901,13 +1200,45 @@ internal partial interface IFlowPropertiesInternal System.Collections.Generic.List DestinationEndpointPort { get; set; } /// Event Hub ID string EventHubId { get; set; } + /// The Flow's data class. + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow string FlowId { get; set; } - /// The flow type for this flow + /// Type of FlowProfile to use for transfer via the flow. + ADT.Models.IFlowProfileMetadata FlowProfile { get; set; } + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + string FlowProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + string FlowProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + string FlowProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string FlowProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string FlowProfileStatus { get; set; } + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] string FlowType { get; set; } /// Force disablement status of the current flow - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// URI to a Key Vault Secret containing a SAS token. string KeyVaultUri { get; set; } @@ -921,14 +1252,33 @@ internal partial interface IFlowPropertiesInternal /// Billing tier for this messaging flow [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The passphrase used for SRT streams string Passphrase { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// Provisioning state of the flow [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; set; } - /// The selected schema for this flow + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + string RemoteEndpointSettingEndpoint { get; set; } + /// + /// The selected schema for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// ADT.Models.ISchema Schema { get; set; } /// Connection ID associated with this schema string SchemaConnectionId { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.json.cs index d773e04e153e..6d85cf6983cc 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/FlowProperties.json.cs @@ -66,6 +66,7 @@ internal FlowProperties(ADT.Runtime.Json.JsonObject json) return; } {_connection = If( json?.PropertyT("connection"), out var __jsonConnection) ? ADT.Models.SelectedResource.FromJson(__jsonConnection) : _connection;} + {_flowProfile = If( json?.PropertyT("flowProfile"), out var __jsonFlowProfile) ? ADT.Models.FlowProfileMetadata.FromJson(__jsonFlowProfile) : _flowProfile;} {_schema = If( json?.PropertyT("schema"), out var __jsonSchema) ? ADT.Models.Schema.FromJson(__jsonSchema) : _schema;} {_messagingOption = If( json?.PropertyT("messagingOptions"), out var __jsonMessagingOptions) ? ADT.Models.MessagingOptions.FromJson(__jsonMessagingOptions) : _messagingOption;} {_apiFlowOption = If( json?.PropertyT("apiFlowOptions"), out var __jsonApiFlowOptions) ? ADT.Models.ApiFlowOptions.FromJson(__jsonApiFlowOptions) : _apiFlowOption;} @@ -81,6 +82,7 @@ internal FlowProperties(ADT.Runtime.Json.JsonObject json) {_storageContainerName = If( json?.PropertyT("storageContainerName"), out var __jsonStorageContainerName) ? (string)__jsonStorageContainerName : (string)_storageContainerName;} {_storageTableName = If( json?.PropertyT("storageTableName"), out var __jsonStorageTableName) ? (string)__jsonStorageTableName : (string)_storageTableName;} {_serviceBusQueueId = If( json?.PropertyT("serviceBusQueueId"), out var __jsonServiceBusQueueId) ? (string)__jsonServiceBusQueueId : (string)_serviceBusQueueId;} + {_flowDataType = If( json?.PropertyT("flowDataType"), out var __jsonFlowDataType) ? (string)__jsonFlowDataType : (string)_flowDataType;} {_flowType = If( json?.PropertyT("flowType"), out var __jsonFlowType) ? (string)__jsonFlowType : (string)_flowType;} {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} @@ -127,6 +129,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A return container; } AddIf( null != this._connection ? (ADT.Runtime.Json.JsonNode) this._connection.ToJson(null,serializationMode) : null, "connection" ,container.Add ); + AddIf( null != this._flowProfile ? (ADT.Runtime.Json.JsonNode) this._flowProfile.ToJson(null,serializationMode) : null, "flowProfile" ,container.Add ); AddIf( null != this._schema ? (ADT.Runtime.Json.JsonNode) this._schema.ToJson(null,serializationMode) : null, "schema" ,container.Add ); AddIf( null != this._messagingOption ? (ADT.Runtime.Json.JsonNode) this._messagingOption.ToJson(null,serializationMode) : null, "messagingOptions" ,container.Add ); AddIf( null != this._apiFlowOption ? (ADT.Runtime.Json.JsonNode) this._apiFlowOption.ToJson(null,serializationMode) : null, "apiFlowOptions" ,container.Add ); @@ -162,6 +165,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._storageContainerName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._storageContainerName.ToString()) : null, "storageContainerName" ,container.Add ); AddIf( null != (((object)this._storageTableName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._storageTableName.ToString()) : null, "storageTableName" ,container.Add ); AddIf( null != (((object)this._serviceBusQueueId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._serviceBusQueueId.ToString()) : null, "serviceBusQueueId" ,container.Add ); + AddIf( null != (((object)this._flowDataType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowDataType.ToString()) : null, "flowDataType" ,container.Add ); AddIf( null != (((object)this._flowType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowType.ToString()) : null, "flowType" ,container.Add ); AddIf( null != (((object)this._dataType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._dataType.ToString()) : null, "dataType" ,container.Add ); if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.PowerShell.cs similarity index 61% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.PowerShell.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.PowerShell.cs index 7ce6bb716b38..4ee2bd3b3558 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.PowerShell.cs @@ -8,8 +8,8 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// Internal metadata of the connection inside pipeline. - [System.ComponentModel.TypeConverter(typeof(ReadInternalMetadataPropertiesTypeConverter))] - public partial class ReadInternalMetadataProperties + [System.ComponentModel.TypeConverter(typeof(InternalMetadataPropertiesTypeConverter))] + public partial class InternalMetadataProperties { /// @@ -63,40 +63,40 @@ public partial class ReadInternalMetadataProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// an instance of . - public static ADT.Models.IReadInternalMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + /// an instance of . + public static ADT.Models.IInternalMetadataProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ReadInternalMetadataProperties(content); + return new InternalMetadataProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - /// an instance of . - public static ADT.Models.IReadInternalMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + /// an instance of . + public static ADT.Models.IInternalMetadataProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ReadInternalMetadataProperties(content); + return new InternalMetadataProperties(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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 ADT.Models.IReadInternalMetadataProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static ADT.Models.IInternalMetadataProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ReadInternalMetadataProperties(global::System.Collections.IDictionary content) + internal InternalMetadataProperties(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,23 +107,23 @@ internal ReadInternalMetadataProperties(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("OperationStatus")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatus = (ADT.Models.IReadOperationStatusProperties) content.GetValueForProperty("OperationStatus",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatus, ADT.Models.ReadOperationStatusPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatus = (ADT.Models.IOperationStatusProperties) content.GetValueForProperty("OperationStatus",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatus, ADT.Models.OperationStatusPropertiesTypeConverter.ConvertFrom); } if (content.Contains("StatusSetBy")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).StatusSetBy = (string) content.GetValueForProperty("StatusSetBy",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).StatusSetBy, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).StatusSetBy = (string) content.GetValueForProperty("StatusSetBy",((ADT.Models.IInternalMetadataPropertiesInternal)this).StatusSetBy, global::System.Convert.ToString); } if (content.Contains("OperationStatusStatus")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusStatus = (string) content.GetValueForProperty("OperationStatusStatus",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusStatus, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusStatus = (string) content.GetValueForProperty("OperationStatusStatus",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusStatus, global::System.Convert.ToString); } if (content.Contains("OperationStatusId")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusId = (string) content.GetValueForProperty("OperationStatusId",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusId, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusId = (string) content.GetValueForProperty("OperationStatusId",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusId, global::System.Convert.ToString); } if (content.Contains("OperationStatusMessage")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusMessage = (string) content.GetValueForProperty("OperationStatusMessage",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusMessage, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusMessage = (string) content.GetValueForProperty("OperationStatusMessage",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusMessage, global::System.Convert.ToString); } // this type is a dictionary; copy elements from source to here. CopyFrom(content); @@ -131,11 +131,11 @@ internal ReadInternalMetadataProperties(global::System.Collections.IDictionary c } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ReadInternalMetadataProperties(global::System.Management.Automation.PSObject content) + internal InternalMetadataProperties(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -146,23 +146,23 @@ internal ReadInternalMetadataProperties(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("OperationStatus")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatus = (ADT.Models.IReadOperationStatusProperties) content.GetValueForProperty("OperationStatus",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatus, ADT.Models.ReadOperationStatusPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatus = (ADT.Models.IOperationStatusProperties) content.GetValueForProperty("OperationStatus",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatus, ADT.Models.OperationStatusPropertiesTypeConverter.ConvertFrom); } if (content.Contains("StatusSetBy")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).StatusSetBy = (string) content.GetValueForProperty("StatusSetBy",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).StatusSetBy, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).StatusSetBy = (string) content.GetValueForProperty("StatusSetBy",((ADT.Models.IInternalMetadataPropertiesInternal)this).StatusSetBy, global::System.Convert.ToString); } if (content.Contains("OperationStatusStatus")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusStatus = (string) content.GetValueForProperty("OperationStatusStatus",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusStatus, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusStatus = (string) content.GetValueForProperty("OperationStatusStatus",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusStatus, global::System.Convert.ToString); } if (content.Contains("OperationStatusId")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusId = (string) content.GetValueForProperty("OperationStatusId",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusId, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusId = (string) content.GetValueForProperty("OperationStatusId",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusId, global::System.Convert.ToString); } if (content.Contains("OperationStatusMessage")) { - ((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusMessage = (string) content.GetValueForProperty("OperationStatusMessage",((ADT.Models.IReadInternalMetadataPropertiesInternal)this).OperationStatusMessage, global::System.Convert.ToString); + ((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusMessage = (string) content.GetValueForProperty("OperationStatusMessage",((ADT.Models.IInternalMetadataPropertiesInternal)this).OperationStatusMessage, global::System.Convert.ToString); } // this type is a dictionary; copy elements from source to here. CopyFrom(content); @@ -187,8 +187,8 @@ public override string ToString() } } /// Internal metadata of the connection inside pipeline. - [System.ComponentModel.TypeConverter(typeof(ReadInternalMetadataPropertiesTypeConverter))] - public partial interface IReadInternalMetadataProperties + [System.ComponentModel.TypeConverter(typeof(InternalMetadataPropertiesTypeConverter))] + public partial interface IInternalMetadataProperties { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.TypeConverter.cs new file mode 100644 index 000000000000..3f95ec2c5e52 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class InternalMetadataPropertiesTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IInternalMetadataProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IInternalMetadataProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return InternalMetadataProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return InternalMetadataProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return InternalMetadataProperties.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.cs similarity index 60% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.cs index ad54efa468fa..8bada5dc4e5f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.cs @@ -8,76 +8,85 @@ namespace ADT.Models using static ADT.Runtime.Extensions; /// Internal metadata of the connection inside pipeline. - public partial class ReadInternalMetadataProperties : - ADT.Models.IReadInternalMetadataProperties, - ADT.Models.IReadInternalMetadataPropertiesInternal + public partial class InternalMetadataProperties : + ADT.Models.IInternalMetadataProperties, + ADT.Models.IInternalMetadataPropertiesInternal { /// Internal Acessors for OperationStatus - ADT.Models.IReadOperationStatusProperties ADT.Models.IReadInternalMetadataPropertiesInternal.OperationStatus { get => (this._operationStatus = this._operationStatus ?? new ADT.Models.ReadOperationStatusProperties()); set { {_operationStatus = value;} } } + ADT.Models.IOperationStatusProperties ADT.Models.IInternalMetadataPropertiesInternal.OperationStatus { get => (this._operationStatus = this._operationStatus ?? new ADT.Models.OperationStatusProperties()); set { {_operationStatus = value;} } } + + /// Internal Acessors for OperationStatusId + string ADT.Models.IInternalMetadataPropertiesInternal.OperationStatusId { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Id; set => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Id = value ?? null; } + + /// Internal Acessors for OperationStatusMessage + string ADT.Models.IInternalMetadataPropertiesInternal.OperationStatusMessage { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Message; set => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Message = value ?? null; } /// Internal Acessors for OperationStatusStatus - string ADT.Models.IReadInternalMetadataPropertiesInternal.OperationStatusStatus { get => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Status; set => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Status = value ?? null; } + string ADT.Models.IInternalMetadataPropertiesInternal.OperationStatusStatus { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Status; set => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Status = value ?? null; } + + /// Internal Acessors for StatusSetBy + string ADT.Models.IInternalMetadataPropertiesInternal.StatusSetBy { get => this._statusSetBy; set { {_statusSetBy = value;} } } /// Backing field for property. - private ADT.Models.IReadOperationStatusProperties _operationStatus; + private ADT.Models.IOperationStatusProperties _operationStatus; /// Operation status associated with the last patch request [ADT.Origin(ADT.PropertyOrigin.Owned)] - internal ADT.Models.IReadOperationStatusProperties OperationStatus { get => (this._operationStatus = this._operationStatus ?? new ADT.Models.ReadOperationStatusProperties()); set => this._operationStatus = value; } + internal ADT.Models.IOperationStatusProperties OperationStatus { get => (this._operationStatus = this._operationStatus ?? new ADT.Models.OperationStatusProperties()); } /// Operation status ID of the last patch request for this connection. [ADT.Origin(ADT.PropertyOrigin.Inlined)] - public string OperationStatusId { get => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Id; set => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Id = value ?? null; } + public string OperationStatusId { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Id; } /// Message for the operation for the last patch request for this connection. [ADT.Origin(ADT.PropertyOrigin.Inlined)] - public string OperationStatusMessage { get => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Message; set => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Message = value ?? null; } + public string OperationStatusMessage { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Message; } /// Operation status for the last patch request for this connection. [ADT.Origin(ADT.PropertyOrigin.Inlined)] - public string OperationStatusStatus { get => ((ADT.Models.IReadOperationStatusPropertiesInternal)OperationStatus).Status; } + public string OperationStatusStatus { get => ((ADT.Models.IOperationStatusPropertiesInternal)OperationStatus).Status; } /// Backing field for property. private string _statusSetBy; /// User that last set the approved status for this connection [ADT.Origin(ADT.PropertyOrigin.Owned)] - public string StatusSetBy { get => this._statusSetBy; set => this._statusSetBy = value; } + public string StatusSetBy { get => this._statusSetBy; } - /// Creates an new instance. - public ReadInternalMetadataProperties() + /// Creates an new instance. + public InternalMetadataProperties() { } } /// Internal metadata of the connection inside pipeline. - public partial interface IReadInternalMetadataProperties : + public partial interface IInternalMetadataProperties : ADT.Runtime.IJsonSerializable, ADT.Runtime.IAssociativeArray { /// Operation status ID of the last patch request for this connection. [ADT.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"Operation status ID of the last patch request for this connection.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] - string OperationStatusId { get; set; } + string OperationStatusId { get; } /// Message for the operation for the last patch request for this connection. [ADT.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"Message for the operation for the last patch request for this connection.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string OperationStatusMessage { get; set; } + string OperationStatusMessage { get; } /// Operation status for the last patch request for this connection. [ADT.Runtime.Info( Required = false, @@ -93,22 +102,22 @@ public partial interface IReadInternalMetadataProperties : /// User that last set the approved status for this connection [ADT.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"User that last set the approved status for this connection", SerializedName = @"statusSetBy", PossibleTypes = new [] { typeof(string) })] - string StatusSetBy { get; set; } + string StatusSetBy { get; } } /// Internal metadata of the connection inside pipeline. - internal partial interface IReadInternalMetadataPropertiesInternal + internal partial interface IInternalMetadataPropertiesInternal { /// Operation status associated with the last patch request - ADT.Models.IReadOperationStatusProperties OperationStatus { get; set; } + ADT.Models.IOperationStatusProperties OperationStatus { get; set; } /// Operation status ID of the last patch request for this connection. string OperationStatusId { get; set; } /// Message for the operation for the last patch request for this connection. diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.dictionary.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.dictionary.cs similarity index 96% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.dictionary.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.dictionary.cs index 7fedf8c45adb..09383745a3e8 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.dictionary.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.dictionary.cs @@ -7,7 +7,7 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - public partial class ReadInternalMetadataProperties : + public partial class InternalMetadataProperties : ADT.Runtime.IAssociativeArray { protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(ADT.Models.ReadInternalMetadataProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(ADT.Models.InternalMetadataProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.json.cs similarity index 77% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.json.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.json.cs index a94f778d2ce8..bca0af59c9db 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadInternalMetadataProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/InternalMetadataProperties.json.cs @@ -8,7 +8,7 @@ namespace ADT.Models using static ADT.Runtime.Extensions; /// Internal metadata of the connection inside pipeline. - public partial class ReadInternalMetadataProperties + public partial class InternalMetadataProperties { /// @@ -54,21 +54,21 @@ public partial class ReadInternalMetadataProperties partial void BeforeToJson(ref ADT.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of ADT.Models.IReadInternalMetadataProperties. + /// Deserializes a into an instance of ADT.Models.IInternalMetadataProperties. /// /// a to deserialize from. - /// an instance of ADT.Models.IReadInternalMetadataProperties. - public static ADT.Models.IReadInternalMetadataProperties FromJson(ADT.Runtime.Json.JsonNode node) + /// an instance of ADT.Models.IInternalMetadataProperties. + public static ADT.Models.IInternalMetadataProperties FromJson(ADT.Runtime.Json.JsonNode node) { - return node is ADT.Runtime.Json.JsonObject json ? new ReadInternalMetadataProperties(json, new global::System.Collections.Generic.HashSet(){ @"operationStatus",@"statusSetBy" }) : null; + return node is ADT.Runtime.Json.JsonObject json ? new InternalMetadataProperties(json, new global::System.Collections.Generic.HashSet(){ @"operationStatus",@"statusSetBy" }) : null; } /// - /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . /// /// A ADT.Runtime.Json.JsonObject instance to deserialize from. /// - internal ReadInternalMetadataProperties(ADT.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + internal InternalMetadataProperties(ADT.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -77,19 +77,19 @@ internal ReadInternalMetadataProperties(ADT.Runtime.Json.JsonObject json, global return; } ADT.Runtime.JsonSerializable.FromJson( json, ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, ADT.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); - {_operationStatus = If( json?.PropertyT("operationStatus"), out var __jsonOperationStatus) ? ADT.Models.ReadOperationStatusProperties.FromJson(__jsonOperationStatus) : _operationStatus;} + {_operationStatus = If( json?.PropertyT("operationStatus"), out var __jsonOperationStatus) ? ADT.Models.OperationStatusProperties.FromJson(__jsonOperationStatus) : _operationStatus;} {_statusSetBy = If( json?.PropertyT("statusSetBy"), out var __jsonStatusSetBy) ? (string)__jsonStatusSetBy : (string)_statusSetBy;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) { @@ -102,8 +102,14 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A return container; } ADT.Runtime.JsonSerializable.ToJson( ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AddIf( null != this._operationStatus ? (ADT.Runtime.Json.JsonNode) this._operationStatus.ToJson(null,serializationMode) : null, "operationStatus" ,container.Add ); - AddIf( null != (((object)this._statusSetBy)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._statusSetBy.ToString()) : null, "statusSetBy" ,container.Add ); + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._operationStatus ? (ADT.Runtime.Json.JsonNode) this._operationStatus.ToJson(null,serializationMode) : null, "operationStatus" ,container.Add ); + } + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._statusSetBy)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._statusSetBy.ToString()) : null, "statusSetBy" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.PowerShell.cs index 9f6e01f9d013..a2db416f6821 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// The request used to list approved schemas within the resource provider. + /// + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. + /// [System.ComponentModel.TypeConverter(typeof(ListApprovedSchemasRequestTypeConverter))] public partial class ListApprovedSchemasRequest { @@ -158,7 +161,8 @@ public override string ToString() return ToJsonString(); } } - /// The request used to list approved schemas within the resource provider. + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. [System.ComponentModel.TypeConverter(typeof(ListApprovedSchemasRequestTypeConverter))] public partial interface IListApprovedSchemasRequest diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.cs index a0862b8a3e8c..aa5ada5ebceb 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The request used to list approved schemas within the resource provider. + /// + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. + /// public partial class ListApprovedSchemasRequest : ADT.Models.IListApprovedSchemasRequest, ADT.Models.IListApprovedSchemasRequestInternal @@ -33,7 +36,8 @@ public ListApprovedSchemasRequest() } } - /// The request used to list approved schemas within the resource provider. + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. public partial interface IListApprovedSchemasRequest : ADT.Runtime.IJsonSerializable { @@ -62,7 +66,8 @@ public partial interface IListApprovedSchemasRequest : string Pipeline { get; set; } } - /// The request used to list approved schemas within the resource provider. + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. internal partial interface IListApprovedSchemasRequestInternal { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.json.cs index fefed52f8805..c73492462a9f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListApprovedSchemasRequest.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The request used to list approved schemas within the resource provider. + /// + /// The request used to list approved schemas within the resource provider. ListApprovedSchemaRequest has reached end of life + /// support starting version 2025-05-30-preview. Please manage schemas with a FlowProfile resource instead. + /// public partial class ListApprovedSchemasRequest { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.PowerShell.cs new file mode 100644 index 000000000000..d4aded9f4967 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + /// + [System.ComponentModel.TypeConverter(typeof(ListFlowProfilesRequestTypeConverter))] + public partial class ListFlowProfilesRequest + { + + /// + /// 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 ADT.Models.IListFlowProfilesRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ListFlowProfilesRequest(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IListFlowProfilesRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ListFlowProfilesRequest(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 ADT.Models.IListFlowProfilesRequest FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ListFlowProfilesRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Pipeline")) + { + ((ADT.Models.IListFlowProfilesRequestInternal)this).Pipeline = (string) content.GetValueForProperty("Pipeline",((ADT.Models.IListFlowProfilesRequestInternal)this).Pipeline, 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 ListFlowProfilesRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Pipeline")) + { + ((ADT.Models.IListFlowProfilesRequestInternal)this).Pipeline = (string) content.GetValueForProperty("Pipeline",((ADT.Models.IListFlowProfilesRequestInternal)this).Pipeline, 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, ADT.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(); + } + } + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + [System.ComponentModel.TypeConverter(typeof(ListFlowProfilesRequestTypeConverter))] + public partial interface IListFlowProfilesRequest + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.TypeConverter.cs new file mode 100644 index 000000000000..a030089e7443 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ListFlowProfilesRequestTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IListFlowProfilesRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IListFlowProfilesRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ListFlowProfilesRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ListFlowProfilesRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ListFlowProfilesRequest.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.cs new file mode 100644 index 000000000000..ef7b98582049 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.cs @@ -0,0 +1,56 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + /// + public partial class ListFlowProfilesRequest : + ADT.Models.IListFlowProfilesRequest, + ADT.Models.IListFlowProfilesRequestInternal + { + + /// Backing field for property. + private string _pipeline; + + /// The name of the pipeline for which to retrieve associated FlowProfiles. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Pipeline { get => this._pipeline; set => this._pipeline = value; } + + /// Creates an new instance. + public ListFlowProfilesRequest() + { + + } + } + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + public partial interface IListFlowProfilesRequest : + ADT.Runtime.IJsonSerializable + { + /// The name of the pipeline for which to retrieve associated FlowProfiles. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the pipeline for which to retrieve associated FlowProfiles.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + string Pipeline { get; set; } + + } + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + internal partial interface IListFlowProfilesRequestInternal + + { + /// The name of the pipeline for which to retrieve associated FlowProfiles. + string Pipeline { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.json.cs new file mode 100644 index 000000000000..6e0f56adc9de --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ListFlowProfilesRequest.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + /// + public partial class ListFlowProfilesRequest + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.IListFlowProfilesRequest. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IListFlowProfilesRequest. + public static ADT.Models.IListFlowProfilesRequest FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new ListFlowProfilesRequest(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal ListFlowProfilesRequest(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_pipeline = If( json?.PropertyT("pipeline"), out var __jsonPipeline) ? (string)__jsonPipeline : (string)_pipeline;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._pipeline)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._pipeline.ToString()) : null, "pipeline" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.PowerShell.cs index 20e30667b7ab..f4c30387b28b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.PowerShell.cs @@ -109,6 +109,10 @@ internal MessagingOptions(global::System.Collections.IDictionary content) { ((ADT.Models.IMessagingOptionsInternal)this).BillingTier = (string) content.GetValueForProperty("BillingTier",((ADT.Models.IMessagingOptionsInternal)this).BillingTier, global::System.Convert.ToString); } + if (content.Contains("PerformancePriority")) + { + ((ADT.Models.IMessagingOptionsInternal)this).PerformancePriority = (string) content.GetValueForProperty("PerformancePriority",((ADT.Models.IMessagingOptionsInternal)this).PerformancePriority, global::System.Convert.ToString); + } AfterDeserializeDictionary(content); } @@ -130,6 +134,10 @@ internal MessagingOptions(global::System.Management.Automation.PSObject content) { ((ADT.Models.IMessagingOptionsInternal)this).BillingTier = (string) content.GetValueForProperty("BillingTier",((ADT.Models.IMessagingOptionsInternal)this).BillingTier, global::System.Convert.ToString); } + if (content.Contains("PerformancePriority")) + { + ((ADT.Models.IMessagingOptionsInternal)this).PerformancePriority = (string) content.GetValueForProperty("PerformancePriority",((ADT.Models.IMessagingOptionsInternal)this).PerformancePriority, global::System.Convert.ToString); + } AfterDeserializePSObject(content); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.cs index 17de00472a3f..da522e19ca0c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.cs @@ -20,6 +20,16 @@ public partial class MessagingOptions : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string BillingTier { get => this._billingTier; set => this._billingTier = value; } + /// Backing field for property. + private string _performancePriority; + + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string PerformancePriority { get => this._performancePriority; set => this._performancePriority = value; } + /// Creates an new instance. public MessagingOptions() { @@ -42,6 +52,21 @@ public partial interface IMessagingOptions : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string BillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions", + SerializedName = @"performancePriority", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PerformancePriority { get; set; } } /// The option associated with messaging flows. @@ -51,6 +76,12 @@ internal partial interface IMessagingOptionsInternal /// Billing tier for this messaging flow [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string BillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string PerformancePriority { get; set; } } } \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.json.cs index e8fe4fce9410..acaf592bdb5c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MessagingOptions.json.cs @@ -76,6 +76,7 @@ internal MessagingOptions(ADT.Runtime.Json.JsonObject json) return; } {_billingTier = If( json?.PropertyT("billingTier"), out var __jsonBillingTier) ? (string)__jsonBillingTier : (string)_billingTier;} + {_performancePriority = If( json?.PropertyT("performancePriority"), out var __jsonPerformancePriority) ? (string)__jsonPerformancePriority : (string)_performancePriority;} AfterFromJson(json); } @@ -99,6 +100,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A return container; } AddIf( null != (((object)this._billingTier)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._billingTier.ToString()) : null, "billingTier" ,container.Add ); + AddIf( null != (((object)this._performancePriority)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._performancePriority.ToString()) : null, "performancePriority" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.PowerShell.cs new file mode 100644 index 000000000000..894acc641184 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.PowerShell.cs @@ -0,0 +1,168 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Rules for filtering files based on Media types (f.k.a MIME types). + [System.ComponentModel.TypeConverter(typeof(MimeFilterRulesetTypeConverter))] + public partial class MimeFilterRuleset + { + + /// + /// 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 ADT.Models.IMimeFilterRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MimeFilterRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IMimeFilterRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MimeFilterRuleset(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 ADT.Models.IMimeFilterRuleset FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MimeFilterRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((ADT.Models.IMimeFilterRulesetInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IMimeFilterRulesetInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Filter")) + { + ((ADT.Models.IMimeFilterRulesetInternal)this).Filter = (System.Collections.Generic.List) content.GetValueForProperty("Filter",((ADT.Models.IMimeFilterRulesetInternal)this).Filter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MimeFilterRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((ADT.Models.IMimeFilterRulesetInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IMimeFilterRulesetInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Filter")) + { + ((ADT.Models.IMimeFilterRulesetInternal)this).Filter = (System.Collections.Generic.List) content.GetValueForProperty("Filter",((ADT.Models.IMimeFilterRulesetInternal)this).Filter, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.MimeTypeFilterTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, ADT.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(); + } + } + /// Rules for filtering files based on Media types (f.k.a MIME types). + [System.ComponentModel.TypeConverter(typeof(MimeFilterRulesetTypeConverter))] + public partial interface IMimeFilterRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.TypeConverter.cs new file mode 100644 index 000000000000..e3a2626d478f --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MimeFilterRulesetTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IMimeFilterRuleset ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IMimeFilterRuleset).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MimeFilterRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MimeFilterRuleset.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MimeFilterRuleset.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.cs new file mode 100644 index 000000000000..21f50b9f5807 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.cs @@ -0,0 +1,91 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Rules for filtering files based on Media types (f.k.a MIME types). + public partial class MimeFilterRuleset : + ADT.Models.IMimeFilterRuleset, + ADT.Models.IMimeFilterRulesetInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _filter; + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Filter { get => this._filter; set => this._filter = value; } + + /// Backing field for property. + private string _type; + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public MimeFilterRuleset() + { + + } + } + /// Rules for filtering files based on Media types (f.k.a MIME types). + public partial interface IMimeFilterRuleset : + ADT.Runtime.IJsonSerializable + { + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + System.Collections.Generic.List Filter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string Type { get; set; } + + } + /// Rules for filtering files based on Media types (f.k.a MIME types). + internal partial interface IMimeFilterRulesetInternal + + { + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + System.Collections.Generic.List Filter { get; set; } + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.json.cs new file mode 100644 index 000000000000..aa34d0117bfb --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeFilterRuleset.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Rules for filtering files based on Media types (f.k.a MIME types). + public partial class MimeFilterRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.IMimeFilterRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IMimeFilterRuleset. + public static ADT.Models.IMimeFilterRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new MimeFilterRuleset(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal MimeFilterRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_filter = If( json?.PropertyT("filters"), out var __jsonFilters) ? If( __jsonFilters as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(ADT.Models.IMimeTypeFilter) (ADT.Models.MimeTypeFilter.FromJson(__u) )) ))() : null : _filter;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._type)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + if (null != this._filter) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._filter ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("filters",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.PowerShell.cs new file mode 100644 index 000000000000..7398c0c5fb2a --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.PowerShell.cs @@ -0,0 +1,170 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + /// + [System.ComponentModel.TypeConverter(typeof(MimeTypeFilterTypeConverter))] + public partial class MimeTypeFilter + { + + /// + /// 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 ADT.Models.IMimeTypeFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MimeTypeFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IMimeTypeFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MimeTypeFilter(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 ADT.Models.IMimeTypeFilter FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MimeTypeFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Media")) + { + ((ADT.Models.IMimeTypeFilterInternal)this).Media = (string) content.GetValueForProperty("Media",((ADT.Models.IMimeTypeFilterInternal)this).Media, global::System.Convert.ToString); + } + if (content.Contains("Extension")) + { + ((ADT.Models.IMimeTypeFilterInternal)this).Extension = (System.Collections.Generic.List) content.GetValueForProperty("Extension",((ADT.Models.IMimeTypeFilterInternal)this).Extension, __y => TypeConverterExtensions.SelectToList(__y, 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 MimeTypeFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Media")) + { + ((ADT.Models.IMimeTypeFilterInternal)this).Media = (string) content.GetValueForProperty("Media",((ADT.Models.IMimeTypeFilterInternal)this).Media, global::System.Convert.ToString); + } + if (content.Contains("Extension")) + { + ((ADT.Models.IMimeTypeFilterInternal)this).Extension = (System.Collections.Generic.List) content.GetValueForProperty("Extension",((ADT.Models.IMimeTypeFilterInternal)this).Extension, __y => TypeConverterExtensions.SelectToList(__y, 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, ADT.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(); + } + } + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + [System.ComponentModel.TypeConverter(typeof(MimeTypeFilterTypeConverter))] + public partial interface IMimeTypeFilter + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.TypeConverter.cs new file mode 100644 index 000000000000..b3507aa80b0d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MimeTypeFilterTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IMimeTypeFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IMimeTypeFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MimeTypeFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MimeTypeFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MimeTypeFilter.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.cs new file mode 100644 index 000000000000..71a33d429aaa --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + /// + public partial class MimeTypeFilter : + ADT.Models.IMimeTypeFilter, + ADT.Models.IMimeTypeFilterInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _extension; + + /// + /// A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, + /// use an empty string ""." + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Extension { get => this._extension; set => this._extension = value; } + + /// Backing field for property. + private string _media; + + /// + /// The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed + /// list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Media { get => this._media; set => this._media = value; } + + /// Creates an new instance. + public MimeTypeFilter() + { + + } + } + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + public partial interface IMimeTypeFilter : + ADT.Runtime.IJsonSerializable + { + /// + /// A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, + /// use an empty string ""." + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, use an empty string """".""", + SerializedName = @"extensions", + PossibleTypes = new [] { typeof(string) })] + System.Collections.Generic.List Extension { get; set; } + /// + /// The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed + /// list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml", + SerializedName = @"media", + PossibleTypes = new [] { typeof(string) })] + string Media { get; set; } + + } + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + internal partial interface IMimeTypeFilterInternal + + { + /// + /// A list of file extensions associated with the specified Media type (e.g., .json, .png). To specify files with no extension, + /// use an empty string ""." + /// + System.Collections.Generic.List Extension { get; set; } + /// + /// The Media Types (f.k.a MIME types), following IANA standards (e.g., application/json, image/png). For a more detailed + /// list of allowed media types please refer to the Tika documentation: https://github.com/apache/tika/blob/main/tika-core/src/main/resources/org/apache/tika/mime/tika-mimetypes.xml + /// + string Media { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.json.cs new file mode 100644 index 000000000000..bd707dddcbda --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/MimeTypeFilter.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Defines a list of Media types (f.k.a MIME Types) and associated file extensions subject to filtering. + /// + public partial class MimeTypeFilter + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.IMimeTypeFilter. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IMimeTypeFilter. + public static ADT.Models.IMimeTypeFilter FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new MimeTypeFilter(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal MimeTypeFilter(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_media = If( json?.PropertyT("media"), out var __jsonMedia) ? (string)__jsonMedia : (string)_media;} + {_extension = If( json?.PropertyT("extensions"), out var __jsonExtensions) ? If( __jsonExtensions as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is ADT.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : _extension;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._media)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._media.ToString()) : null, "media" ,container.Add ); + if (null != this._extension) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._extension ) + { + AddIf(null != (((object)__x)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("extensions",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.PowerShell.cs similarity index 68% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.PowerShell.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.PowerShell.cs index e442da214e23..a1d561c1723b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.PowerShell.cs @@ -8,8 +8,8 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// Operation status associated with the last patch request - [System.ComponentModel.TypeConverter(typeof(ReadOperationStatusPropertiesTypeConverter))] - public partial class ReadOperationStatusProperties + [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] + public partial class OperationStatusProperties { /// @@ -63,40 +63,40 @@ public partial class ReadOperationStatusProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// an instance of . - public static ADT.Models.IReadOperationStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + /// an instance of . + public static ADT.Models.IOperationStatusProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ReadOperationStatusProperties(content); + return new OperationStatusProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - /// an instance of . - public static ADT.Models.IReadOperationStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + /// an instance of . + public static ADT.Models.IOperationStatusProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ReadOperationStatusProperties(content); + return new OperationStatusProperties(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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 ADT.Models.IReadOperationStatusProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static ADT.Models.IOperationStatusProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ReadOperationStatusProperties(global::System.Collections.IDictionary content) + internal OperationStatusProperties(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,25 +107,25 @@ internal ReadOperationStatusProperties(global::System.Collections.IDictionary co // actually deserialize if (content.Contains("Status")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Status, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IOperationStatusPropertiesInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Id, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IOperationStatusPropertiesInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Message, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((ADT.Models.IOperationStatusPropertiesInternal)this).Message, global::System.Convert.ToString); } AfterDeserializeDictionary(content); } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ReadOperationStatusProperties(global::System.Management.Automation.PSObject content) + internal OperationStatusProperties(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -136,15 +136,15 @@ internal ReadOperationStatusProperties(global::System.Management.Automation.PSOb // actually deserialize if (content.Contains("Status")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Status, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Status = (string) content.GetValueForProperty("Status",((ADT.Models.IOperationStatusPropertiesInternal)this).Status, global::System.Convert.ToString); } if (content.Contains("Id")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Id, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Id = (string) content.GetValueForProperty("Id",((ADT.Models.IOperationStatusPropertiesInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((ADT.Models.IReadOperationStatusPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((ADT.Models.IReadOperationStatusPropertiesInternal)this).Message, global::System.Convert.ToString); + ((ADT.Models.IOperationStatusPropertiesInternal)this).Message = (string) content.GetValueForProperty("Message",((ADT.Models.IOperationStatusPropertiesInternal)this).Message, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -167,8 +167,8 @@ public override string ToString() } } /// Operation status associated with the last patch request - [System.ComponentModel.TypeConverter(typeof(ReadOperationStatusPropertiesTypeConverter))] - public partial interface IReadOperationStatusProperties + [System.ComponentModel.TypeConverter(typeof(OperationStatusPropertiesTypeConverter))] + public partial interface IOperationStatusProperties { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.TypeConverter.cs new file mode 100644 index 000000000000..4ce7410ff167 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationStatusPropertiesTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IOperationStatusProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IOperationStatusProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationStatusProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationStatusProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationStatusProperties.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.cs similarity index 73% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.cs index 653b8c85eed3..734055316986 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.cs @@ -8,27 +8,33 @@ namespace ADT.Models using static ADT.Runtime.Extensions; /// Operation status associated with the last patch request - public partial class ReadOperationStatusProperties : - ADT.Models.IReadOperationStatusProperties, - ADT.Models.IReadOperationStatusPropertiesInternal + public partial class OperationStatusProperties : + ADT.Models.IOperationStatusProperties, + ADT.Models.IOperationStatusPropertiesInternal { + /// Internal Acessors for Id + string ADT.Models.IOperationStatusPropertiesInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Message + string ADT.Models.IOperationStatusPropertiesInternal.Message { get => this._message; set { {_message = value;} } } + /// Internal Acessors for Status - string ADT.Models.IReadOperationStatusPropertiesInternal.Status { get => this._status; set { {_status = value;} } } + string ADT.Models.IOperationStatusPropertiesInternal.Status { get => this._status; set { {_status = value;} } } /// Backing field for property. private string _id; /// Operation status ID of the last patch request for this connection. [ADT.Origin(ADT.PropertyOrigin.Owned)] - public string Id { get => this._id; set => this._id = value; } + public string Id { get => this._id; } /// Backing field for property. private string _message; /// Message for the operation for the last patch request for this connection. [ADT.Origin(ADT.PropertyOrigin.Owned)] - public string Message { get => this._message; set => this._message = value; } + public string Message { get => this._message; } /// Backing field for property. private string _status; @@ -37,38 +43,38 @@ public partial class ReadOperationStatusProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string Status { get => this._status; } - /// Creates an new instance. - public ReadOperationStatusProperties() + /// Creates an new instance. + public OperationStatusProperties() { } } /// Operation status associated with the last patch request - public partial interface IReadOperationStatusProperties : + public partial interface IOperationStatusProperties : ADT.Runtime.IJsonSerializable { /// Operation status ID of the last patch request for this connection. [ADT.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"Operation status ID of the last patch request for this connection.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] - string Id { get; set; } + string Id { get; } /// Message for the operation for the last patch request for this connection. [ADT.Runtime.Info( Required = false, - ReadOnly = false, + ReadOnly = true, Read = true, - Create = true, - Update = true, + Create = false, + Update = false, Description = @"Message for the operation for the last patch request for this connection.", SerializedName = @"message", PossibleTypes = new [] { typeof(string) })] - string Message { get; set; } + string Message { get; } /// Operation status for the last patch request for this connection. [ADT.Runtime.Info( Required = false, @@ -84,7 +90,7 @@ public partial interface IReadOperationStatusProperties : } /// Operation status associated with the last patch request - internal partial interface IReadOperationStatusPropertiesInternal + internal partial interface IOperationStatusPropertiesInternal { /// Operation status ID of the last patch request for this connection. diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.json.cs similarity index 80% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.json.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.json.cs index 7cae17c5a958..afd5dc585a35 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadOperationStatusProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/OperationStatusProperties.json.cs @@ -8,7 +8,7 @@ namespace ADT.Models using static ADT.Runtime.Extensions; /// Operation status associated with the last patch request - public partial class ReadOperationStatusProperties + public partial class OperationStatusProperties { /// @@ -54,20 +54,20 @@ public partial class ReadOperationStatusProperties partial void BeforeToJson(ref ADT.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of ADT.Models.IReadOperationStatusProperties. + /// Deserializes a into an instance of ADT.Models.IOperationStatusProperties. /// /// a to deserialize from. - /// an instance of ADT.Models.IReadOperationStatusProperties. - public static ADT.Models.IReadOperationStatusProperties FromJson(ADT.Runtime.Json.JsonNode node) + /// an instance of ADT.Models.IOperationStatusProperties. + public static ADT.Models.IOperationStatusProperties FromJson(ADT.Runtime.Json.JsonNode node) { - return node is ADT.Runtime.Json.JsonObject json ? new ReadOperationStatusProperties(json) : null; + return node is ADT.Runtime.Json.JsonObject json ? new OperationStatusProperties(json) : null; } /// - /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . /// /// A ADT.Runtime.Json.JsonObject instance to deserialize from. - internal ReadOperationStatusProperties(ADT.Runtime.Json.JsonObject json) + internal OperationStatusProperties(ADT.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -82,13 +82,13 @@ internal ReadOperationStatusProperties(ADT.Runtime.Json.JsonObject json) } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) { @@ -104,8 +104,14 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A { AddIf( null != (((object)this._status)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); } - AddIf( null != (((object)this._id)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); - AddIf( null != (((object)this._message)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.PowerShell.cs index ff8f34c8c3ed..9ba42f65ee51 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.PowerShell.cs @@ -149,6 +149,10 @@ internal PendingConnection(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingConnectionInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IPendingConnectionInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IPendingConnectionInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IPendingConnectionInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IPendingConnectionInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IPendingConnectionInternal)this).RequirementId, global::System.Convert.ToString); @@ -193,6 +197,10 @@ internal PendingConnection(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingConnectionInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IPendingConnectionInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IPendingConnectionInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IPendingConnectionInternal)this).ApiHostname, global::System.Convert.ToString); + } if (content.Contains("Tag")) { ((ADT.Models.IPendingConnectionInternal)this).Tag = (ADT.Models.IPendingConnectionTags) content.GetValueForProperty("Tag",((ADT.Models.IPendingConnectionInternal)this).Tag, ADT.Models.PendingConnectionTagsTypeConverter.ConvertFrom); @@ -298,6 +306,10 @@ internal PendingConnection(global::System.Management.Automation.PSObject content { ((ADT.Models.IPendingConnectionInternal)this).FlowType = (System.Collections.Generic.List) content.GetValueForProperty("FlowType",((ADT.Models.IPendingConnectionInternal)this).FlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("FlowProfileList")) + { + ((ADT.Models.IPendingConnectionInternal)this).FlowProfileList = (System.Collections.Generic.List) content.GetValueForProperty("FlowProfileList",((ADT.Models.IPendingConnectionInternal)this).FlowProfileList, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom)); + } if (content.Contains("RequirementId")) { ((ADT.Models.IPendingConnectionInternal)this).RequirementId = (string) content.GetValueForProperty("RequirementId",((ADT.Models.IPendingConnectionInternal)this).RequirementId, global::System.Convert.ToString); @@ -342,6 +354,10 @@ internal PendingConnection(global::System.Management.Automation.PSObject content { ((ADT.Models.IPendingConnectionInternal)this).SchemaUri = (System.Collections.Generic.List) content.GetValueForProperty("SchemaUri",((ADT.Models.IPendingConnectionInternal)this).SchemaUri, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("ApiHostname")) + { + ((ADT.Models.IPendingConnectionInternal)this).ApiHostname = (string) content.GetValueForProperty("ApiHostname",((ADT.Models.IPendingConnectionInternal)this).ApiHostname, global::System.Convert.ToString); + } if (content.Contains("Tag")) { ((ADT.Models.IPendingConnectionInternal)this).Tag = (ADT.Models.IPendingConnectionTags) content.GetValueForProperty("Tag",((ADT.Models.IPendingConnectionInternal)this).Tag, ADT.Models.PendingConnectionTagsTypeConverter.ConvertFrom); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.cs index aee5829ca4bc..c80c70a3749d 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.cs @@ -70,6 +70,13 @@ public partial class PendingConnection : /// Internal Acessors for Type string ADT.Models.IPendingConnectionInternal.Type { get => this._type; set { {_type = value;} } } + /// Backing field for property. + private string _apiHostname; + + /// Hostname specific to API Flows + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string ApiHostname { get => this._apiHostname; set => this._apiHostname = value; } + /// Backing field for property. private string _approver; @@ -91,10 +98,20 @@ public partial class PendingConnection : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string Direction { get => this._direction; set => this._direction = value; } + /// Backing field for property. + private System.Collections.Generic.List _flowProfileList; + + /// Provides a list of FlowProfiles . + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List FlowProfileList { get => this._flowProfileList; set => this._flowProfileList = value; } + /// Backing field for property. private System.Collections.Generic.List _flowType; - /// The flow types being requested for this connection + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List FlowType { get => this._flowType; set => this._flowType = value; } @@ -166,7 +183,10 @@ public partial class PendingConnection : /// Backing field for property. private System.Collections.Generic.List _policy; - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } @@ -201,14 +221,20 @@ public partial class PendingConnection : /// Backing field for property. private System.Collections.Generic.List _schema; - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Schema { get => this._schema; set => this._schema = value; } /// Backing field for property. private System.Collections.Generic.List _schemaUri; - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List SchemaUri { get => this._schemaUri; set => this._schemaUri = value; } @@ -299,6 +325,17 @@ public PendingConnection() public partial interface IPendingConnection : ADT.Runtime.IJsonSerializable { + /// Hostname specific to API Flows + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Hostname specific to API Flows", + SerializedName = @"apiHostname", + PossibleTypes = new [] { typeof(string) })] + string ApiHostname { get; set; } /// Approver of this connection request [ADT.Runtime.Info( Required = false, @@ -333,14 +370,28 @@ public partial interface IPendingConnection : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types being requested for this connection", + Description = @"Provides a list of FlowProfiles .", + SerializedName = @"flowProfileList", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfileMetadata) })] + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The flow types being requested for this connection. This FlowType property has reached end of life support starting version 2025-05-30-preview. Please create a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -355,7 +406,7 @@ public partial interface IPendingConnection : Description = @"Force disablement status of the current connection", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -448,14 +499,17 @@ public partial interface IPendingConnection : SerializedName = @"pipeline", PossibleTypes = new [] { typeof(string) })] string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this connection", + Description = @"The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -504,25 +558,31 @@ public partial interface IPendingConnection : SerializedName = @"requirementId", PossibleTypes = new [] { typeof(string) })] string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schemas for this connection", + Description = @"The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemas", PossibleTypes = new [] { typeof(ADT.Models.ISchema) })] System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The schema URIs for this connection", + Description = @"The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemaUris", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List SchemaUri { get; set; } @@ -669,6 +729,8 @@ public partial interface IPendingConnection : internal partial interface IPendingConnectionInternal { + /// Hostname specific to API Flows + string ApiHostname { get; set; } /// Approver of this connection request string Approver { get; set; } /// The timestamp that this connection request was submitted at @@ -676,11 +738,16 @@ internal partial interface IPendingConnectionInternal /// Direction of data movement [global::ADT.PSArgumentCompleterAttribute("Send", "Receive")] string Direction { get; set; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + System.Collections.Generic.List FlowProfileList { get; set; } + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } /// Force disablement status of the current connection - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -701,7 +768,10 @@ internal partial interface IPendingConnectionInternal string Pin { get; set; } /// Pipeline to use to transfer data string Pipeline { get; set; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// The primary contact for this connection request string PrimaryContact { get; set; } @@ -712,9 +782,15 @@ internal partial interface IPendingConnectionInternal string RemoteSubscriptionId { get; set; } /// Requirement ID of the connection string RequirementId { get; set; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Schema { get; set; } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List SchemaUri { get; set; } /// The secondary contacts for this connection request System.Collections.Generic.List SecondaryContact { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.json.cs index dccc1f5e488f..b81fd6d302a3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingConnection.json.cs @@ -86,17 +86,19 @@ internal PendingConnection(ADT.Runtime.Json.JsonObject json) {_linkStatus = If( json?.PropertyT("linkStatus"), out var __jsonLinkStatus) ? (string)__jsonLinkStatus : (string)_linkStatus;} {_linkedConnectionId = If( json?.PropertyT("linkedConnectionId"), out var __jsonLinkedConnectionId) ? (string)__jsonLinkedConnectionId : (string)_linkedConnectionId;} {_flowType = If( json?.PropertyT("flowTypes"), out var __jsonFlowTypes) ? If( __jsonFlowTypes as ADT.Runtime.Json.JsonArray, out var __q) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is ADT.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : _flowType;} + {_flowProfileList = If( json?.PropertyT("flowProfileList"), out var __jsonFlowProfileList) ? If( __jsonFlowProfileList as ADT.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(ADT.Models.IFlowProfileMetadata) (ADT.Models.FlowProfileMetadata.FromJson(__k) )) ))() : null : _flowProfileList;} {_requirementId = If( json?.PropertyT("requirementId"), out var __jsonRequirementId) ? (string)__jsonRequirementId : (string)_requirementId;} {_remoteSubscriptionId = If( json?.PropertyT("remoteSubscriptionId"), out var __jsonRemoteSubscriptionId) ? (string)__jsonRemoteSubscriptionId : (string)_remoteSubscriptionId;} {_approver = If( json?.PropertyT("approver"), out var __jsonApprover) ? (string)__jsonApprover : (string)_approver;} {_pin = If( json?.PropertyT("pin"), out var __jsonPin) ? (string)__jsonPin : (string)_pin;} {_dateSubmitted = If( json?.PropertyT("dateSubmitted"), out var __jsonDateSubmitted) ? global::System.DateTime.TryParse((string)__jsonDateSubmitted, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonDateSubmittedValue) ? __jsonDateSubmittedValue : _dateSubmitted : _dateSubmitted;} {_primaryContact = If( json?.PropertyT("primaryContact"), out var __jsonPrimaryContact) ? (string)__jsonPrimaryContact : (string)_primaryContact;} - {_secondaryContact = If( json?.PropertyT("secondaryContacts"), out var __jsonSecondaryContacts) ? If( __jsonSecondaryContacts as ADT.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is ADT.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _secondaryContact;} + {_secondaryContact = If( json?.PropertyT("secondaryContacts"), out var __jsonSecondaryContacts) ? If( __jsonSecondaryContacts as ADT.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is ADT.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _secondaryContact;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} - {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as ADT.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is ADT.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _policy;} - {_schema = If( json?.PropertyT("schemas"), out var __jsonSchemas) ? If( __jsonSchemas as ADT.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(ADT.Models.ISchema) (ADT.Models.Schema.FromJson(__a) )) ))() : null : _schema;} - {_schemaUri = If( json?.PropertyT("schemaUris"), out var __jsonSchemaUris) ? If( __jsonSchemaUris as ADT.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is ADT.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : _schemaUri;} + {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as ADT.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is ADT.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : _policy;} + {_schema = If( json?.PropertyT("schemas"), out var __jsonSchemas) ? If( __jsonSchemas as ADT.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(ADT.Models.ISchema) (ADT.Models.Schema.FromJson(___v) )) ))() : null : _schema;} + {_schemaUri = If( json?.PropertyT("schemaUris"), out var __jsonSchemaUris) ? If( __jsonSchemaUris as ADT.Runtime.Json.JsonArray, out var ___r) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___r, (___q)=>(string) (___q is ADT.Runtime.Json.JsonString ___p ? (string)(___p.ToString()) : null)) ))() : null : _schemaUri;} + {_apiHostname = If( json?.PropertyT("apiHostname"), out var __jsonApiHostname) ? (string)__jsonApiHostname : (string)_apiHostname;} {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? ADT.Models.PendingConnectionTags.FromJson(__jsonTags) : _tag;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} @@ -172,6 +174,15 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A } container.Add("flowTypes",__r); } + if (null != this._flowProfileList) + { + var __m = new ADT.Runtime.Json.XNodeArray(); + foreach( var __n in this._flowProfileList ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("flowProfileList",__m); + } AddIf( null != (((object)this._requirementId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._requirementId.ToString()) : null, "requirementId" ,container.Add ); AddIf( null != (((object)this._remoteSubscriptionId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._remoteSubscriptionId.ToString()) : null, "remoteSubscriptionId" ,container.Add ); if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) @@ -186,12 +197,12 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._primaryContact)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._primaryContact.ToString()) : null, "primaryContact" ,container.Add ); if (null != this._secondaryContact) { - var __m = new ADT.Runtime.Json.XNodeArray(); - foreach( var __n in this._secondaryContact ) + var __h = new ADT.Runtime.Json.XNodeArray(); + foreach( var __i in this._secondaryContact ) { - AddIf(null != (((object)__n)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + AddIf(null != (((object)__i)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); } - container.Add("secondaryContacts",__m); + container.Add("secondaryContacts",__h); } if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) { @@ -199,31 +210,32 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A } if (null != this._policy) { - var __h = new ADT.Runtime.Json.XNodeArray(); - foreach( var __i in this._policy ) + var __c = new ADT.Runtime.Json.XNodeArray(); + foreach( var __d in this._policy ) { - AddIf(null != (((object)__i)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + AddIf(null != (((object)__d)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); } - container.Add("policies",__h); + container.Add("policies",__c); } if (null != this._schema) { - var __c = new ADT.Runtime.Json.XNodeArray(); - foreach( var __d in this._schema ) + var ___x = new ADT.Runtime.Json.XNodeArray(); + foreach( var ___y in this._schema ) { - AddIf(__d?.ToJson(null, serializationMode) ,__c.Add); + AddIf(___y?.ToJson(null, serializationMode) ,___x.Add); } - container.Add("schemas",__c); + container.Add("schemas",___x); } if (null != this._schemaUri) { - var ___x = new ADT.Runtime.Json.XNodeArray(); - foreach( var ___y in this._schemaUri ) + var ___s = new ADT.Runtime.Json.XNodeArray(); + foreach( var ___t in this._schemaUri ) { - AddIf(null != (((object)___y)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + AddIf(null != (((object)___t)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(___t.ToString()) : null ,___s.Add); } - container.Add("schemaUris",___x); + container.Add("schemaUris",___s); } + AddIf( null != (((object)this._apiHostname)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._apiHostname.ToString()) : null, "apiHostname" ,container.Add ); AddIf( null != this._tag ? (ADT.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)||serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeCreate)) { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.PowerShell.cs index a8b622e4aecb..9287933db774 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.PowerShell.cs @@ -109,6 +109,10 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IPendingFlowInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("FlowProfile")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("FlowProfile",((ADT.Models.IPendingFlowInternal)this).FlowProfile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("Schema")) { ((ADT.Models.IPendingFlowInternal)this).Schema = (ADT.Models.ISchema) content.GetValueForProperty("Schema",((ADT.Models.IPendingFlowInternal)this).Schema, ADT.Models.SchemaTypeConverter.ConvertFrom); @@ -181,6 +185,10 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IPendingFlowInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IPendingFlowInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("FlowType")) { ((ADT.Models.IPendingFlowInternal)this).FlowType = (string) content.GetValueForProperty("FlowType",((ADT.Models.IPendingFlowInternal)this).FlowType, global::System.Convert.ToString); @@ -253,6 +261,10 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IPendingFlowInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("FlowProfileStatus")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileStatus = (string) content.GetValueForProperty("FlowProfileStatus",((ADT.Models.IPendingFlowInternal)this).FlowProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IPendingFlowInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IPendingFlowInternal)this).SchemaId, global::System.Convert.ToString); @@ -305,6 +317,10 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IPendingFlowInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IPendingFlowInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -333,10 +349,38 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IPendingFlowInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("FlowProfilePipeline")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfilePipeline = (string) content.GetValueForProperty("FlowProfilePipeline",((ADT.Models.IPendingFlowInternal)this).FlowProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IPendingFlowInternal)this).FlowProfileName, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileReplicationScenario")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileReplicationScenario = (string) content.GetValueForProperty("FlowProfileReplicationScenario",((ADT.Models.IPendingFlowInternal)this).FlowProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IPendingFlowInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileDescription")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileDescription = (string) content.GetValueForProperty("FlowProfileDescription",((ADT.Models.IPendingFlowInternal)this).FlowProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IPendingFlowInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IPendingFlowInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IPendingFlowInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IPendingFlowInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -345,6 +389,14 @@ internal PendingFlow(global::System.Collections.IDictionary content) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SystemDataCreatedByType")) { ((ADT.Models.IPendingFlowInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((ADT.Models.IPendingFlowInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); @@ -382,6 +434,10 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).Connection = (ADT.Models.ISelectedResource) content.GetValueForProperty("Connection",((ADT.Models.IPendingFlowInternal)this).Connection, ADT.Models.SelectedResourceTypeConverter.ConvertFrom); } + if (content.Contains("FlowProfile")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfile = (ADT.Models.IFlowProfileMetadata) content.GetValueForProperty("FlowProfile",((ADT.Models.IPendingFlowInternal)this).FlowProfile, ADT.Models.FlowProfileMetadataTypeConverter.ConvertFrom); + } if (content.Contains("Schema")) { ((ADT.Models.IPendingFlowInternal)this).Schema = (ADT.Models.ISchema) content.GetValueForProperty("Schema",((ADT.Models.IPendingFlowInternal)this).Schema, ADT.Models.SchemaTypeConverter.ConvertFrom); @@ -454,6 +510,10 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).ServiceBusQueueId = (string) content.GetValueForProperty("ServiceBusQueueId",((ADT.Models.IPendingFlowInternal)this).ServiceBusQueueId, global::System.Convert.ToString); } + if (content.Contains("FlowDataType")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowDataType = (string) content.GetValueForProperty("FlowDataType",((ADT.Models.IPendingFlowInternal)this).FlowDataType, global::System.Convert.ToString); + } if (content.Contains("FlowType")) { ((ADT.Models.IPendingFlowInternal)this).FlowType = (string) content.GetValueForProperty("FlowType",((ADT.Models.IPendingFlowInternal)this).FlowType, global::System.Convert.ToString); @@ -526,6 +586,10 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).Type = (string) content.GetValueForProperty("Type",((ADT.Models.IPendingFlowInternal)this).Type, global::System.Convert.ToString); } + if (content.Contains("FlowProfileStatus")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileStatus = (string) content.GetValueForProperty("FlowProfileStatus",((ADT.Models.IPendingFlowInternal)this).FlowProfileStatus, global::System.Convert.ToString); + } if (content.Contains("SchemaId")) { ((ADT.Models.IPendingFlowInternal)this).SchemaId = (string) content.GetValueForProperty("SchemaId",((ADT.Models.IPendingFlowInternal)this).SchemaId, global::System.Convert.ToString); @@ -578,6 +642,10 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAudienceOverride = (string) content.GetValueForProperty("ApiFlowOptionAudienceOverride",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAudienceOverride, global::System.Convert.ToString); } + if (content.Contains("ApiFlowOptionAuthentication")) + { + ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("ApiFlowOptionAuthentication",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SourceAddressSourceAddresses")) { ((ADT.Models.IPendingFlowInternal)this).SourceAddressSourceAddresses = (System.Collections.Generic.List) content.GetValueForProperty("SourceAddressSourceAddresses",((ADT.Models.IPendingFlowInternal)this).SourceAddressSourceAddresses, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); @@ -606,10 +674,38 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).ConnectionSubscriptionName = (string) content.GetValueForProperty("ConnectionSubscriptionName",((ADT.Models.IPendingFlowInternal)this).ConnectionSubscriptionName, global::System.Convert.ToString); } + if (content.Contains("FlowProfilePipeline")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfilePipeline = (string) content.GetValueForProperty("FlowProfilePipeline",((ADT.Models.IPendingFlowInternal)this).FlowProfilePipeline, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileName")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileName = (string) content.GetValueForProperty("FlowProfileName",((ADT.Models.IPendingFlowInternal)this).FlowProfileName, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileReplicationScenario")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileReplicationScenario = (string) content.GetValueForProperty("FlowProfileReplicationScenario",((ADT.Models.IPendingFlowInternal)this).FlowProfileReplicationScenario, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileId")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileId = (string) content.GetValueForProperty("FlowProfileId",((ADT.Models.IPendingFlowInternal)this).FlowProfileId, global::System.Convert.ToString); + } + if (content.Contains("FlowProfileDescription")) + { + ((ADT.Models.IPendingFlowInternal)this).FlowProfileDescription = (string) content.GetValueForProperty("FlowProfileDescription",((ADT.Models.IPendingFlowInternal)this).FlowProfileDescription, global::System.Convert.ToString); + } if (content.Contains("MessagingOptionBillingTier")) { ((ADT.Models.IPendingFlowInternal)this).MessagingOptionBillingTier = (string) content.GetValueForProperty("MessagingOptionBillingTier",((ADT.Models.IPendingFlowInternal)this).MessagingOptionBillingTier, global::System.Convert.ToString); } + if (content.Contains("MessagingOptionPerformancePriority")) + { + ((ADT.Models.IPendingFlowInternal)this).MessagingOptionPerformancePriority = (string) content.GetValueForProperty("MessagingOptionPerformancePriority",((ADT.Models.IPendingFlowInternal)this).MessagingOptionPerformancePriority, global::System.Convert.ToString); + } + if (content.Contains("ApiFlowOptionRemoteEndpointSetting")) + { + ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteEndpointSetting = (ADT.Models.IRemoteEndpointSettings) content.GetValueForProperty("ApiFlowOptionRemoteEndpointSetting",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteEndpointSetting, ADT.Models.RemoteEndpointSettingsTypeConverter.ConvertFrom); + } if (content.Contains("ApiFlowOptionSenderClientId")) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionSenderClientId = (string) content.GetValueForProperty("ApiFlowOptionSenderClientId",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionSenderClientId, global::System.Convert.ToString); @@ -618,6 +714,14 @@ internal PendingFlow(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId = (string) content.GetValueForProperty("ApiFlowOptionRemoteCallingModeClientId",((ADT.Models.IPendingFlowInternal)this).ApiFlowOptionRemoteCallingModeClientId, global::System.Convert.ToString); } + if (content.Contains("RemoteEndpointSettingEndpoint")) + { + ((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingEndpoint = (string) content.GetValueForProperty("RemoteEndpointSettingEndpoint",((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingEndpoint, global::System.Convert.ToString); + } + if (content.Contains("RemoteEndpointSettingAuthentication")) + { + ((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingAuthentication = (System.Collections.Generic.List) content.GetValueForProperty("RemoteEndpointSettingAuthentication",((ADT.Models.IPendingFlowInternal)this).RemoteEndpointSettingAuthentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } if (content.Contains("SystemDataCreatedByType")) { ((ADT.Models.IPendingFlowInternal)this).SystemDataCreatedByType = (string) content.GetValueForProperty("SystemDataCreatedByType",((ADT.Models.IPendingFlowInternal)this).SystemDataCreatedByType, global::System.Convert.ToString); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.cs index 5aeca2da9fcb..930edb010388 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.cs @@ -16,6 +16,9 @@ public partial class PendingFlow : /// Internal Acessors for ApiFlowOption ADT.Models.IApiFlowOptions ADT.Models.IPendingFlowInternal.ApiFlowOption { get => (this._apiFlowOption = this._apiFlowOption ?? new ADT.Models.ApiFlowOptions()); set { {_apiFlowOption = value;} } } + /// Internal Acessors for ApiFlowOptionRemoteEndpointSetting + ADT.Models.IRemoteEndpointSettings ADT.Models.IPendingFlowInternal.ApiFlowOptionRemoteEndpointSetting { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSetting; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSetting = value ?? null /* model class */; } + /// Internal Acessors for Connection ADT.Models.ISelectedResource ADT.Models.IPendingFlowInternal.Connection { get => (this._connection = this._connection ?? new ADT.Models.SelectedResource()); set { {_connection = value;} } } @@ -25,6 +28,9 @@ public partial class PendingFlow : /// Internal Acessors for FlowId string ADT.Models.IPendingFlowInternal.FlowId { get => this._flowId; set { {_flowId = value;} } } + /// Internal Acessors for FlowProfile + ADT.Models.IFlowProfileMetadata ADT.Models.IPendingFlowInternal.FlowProfile { get => (this._flowProfile = this._flowProfile ?? new ADT.Models.FlowProfileMetadata()); set { {_flowProfile = value;} } } + /// Internal Acessors for ForceDisabledStatus System.Collections.Generic.List ADT.Models.IPendingFlowInternal.ForceDisabledStatus { get => this._forceDisabledStatus; set { {_forceDisabledStatus = value;} } } @@ -92,27 +98,49 @@ public partial class PendingFlow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionApiMode { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).ApiMode; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).ApiMode = value ?? null; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionAudienceOverride { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).AudienceOverride; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).AudienceOverride = value ?? null; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List ApiFlowOptionAuthentication { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Authentication; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Authentication = value ?? null /* arrayOf */; } + /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionCname { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Cname; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).Cname = value ?? null; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionIdentityTranslation { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).IdentityTranslation; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).IdentityTranslation = value ?? null; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteCallingModeClientId { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteCallingModeClientId; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteCallingModeClientId = value ?? null; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionRemoteEndpoint { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpoint; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpoint = value ?? null; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string ApiFlowOptionSenderClientId { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).SenderClientId; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).SenderClientId = value ?? null; } @@ -159,7 +187,10 @@ public partial class PendingFlow : /// Backing field for property. private string _dataType; - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string DataType { get => this._dataType; set => this._dataType = value; } @@ -184,6 +215,13 @@ public partial class PendingFlow : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string EventHubId { get => this._eventHubId; set => this._eventHubId = value; } + /// Backing field for property. + private string _flowDataType; + + /// The Flow's data class. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string FlowDataType { get => this._flowDataType; set => this._flowDataType = value; } + /// Backing field for property. private string _flowId; @@ -191,10 +229,54 @@ public partial class PendingFlow : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string FlowId { get => this._flowId; } + /// Backing field for property. + private ADT.Models.IFlowProfileMetadata _flowProfile; + + /// Type of FlowProfile to use for transfer via the flow. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + internal ADT.Models.IFlowProfileMetadata FlowProfile { get => (this._flowProfile = this._flowProfile ?? new ADT.Models.FlowProfileMetadata()); set => this._flowProfile = value; } + + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileDescription { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Description; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Description = value ?? null; } + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileId { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).FlowProfileId; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).FlowProfileId = value ?? null; } + + /// The name of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileName { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Name; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Name = value ?? null; } + + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfilePipeline { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Pipeline; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Pipeline = value ?? null; } + + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileReplicationScenario { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).ReplicationScenario; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).ReplicationScenario = value ?? null; } + + /// The operational status of the FlowProfile. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string FlowProfileStatus { get => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Status; set => ((ADT.Models.IFlowProfileMetadataInternal)FlowProfile).Status = value ?? null; } + /// Backing field for property. private string _flowType; - /// The flow type for this flow + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public string FlowType { get => this._flowType; set => this._flowType = value; } @@ -253,6 +335,13 @@ public partial class PendingFlow : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string MessagingOptionBillingTier { get => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).BillingTier; set => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).BillingTier = value ?? null; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string MessagingOptionPerformancePriority { get => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).PerformancePriority; set => ((ADT.Models.IMessagingOptionsInternal)MessagingOption).PerformancePriority = value ?? null; } + /// Backing field for property. private string _name; @@ -270,7 +359,10 @@ public partial class PendingFlow : /// Backing field for property. private System.Collections.Generic.List _policy; - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } @@ -281,10 +373,24 @@ public partial class PendingFlow : [ADT.Origin(ADT.PropertyOrigin.Owned)] public string ProvisioningState { get => this._provisioningState; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List RemoteEndpointSettingAuthentication { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingAuthentication; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingAuthentication = value ?? null /* arrayOf */; } + + /// The remote endpoint uri all API calls. + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public string RemoteEndpointSettingEndpoint { get => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingEndpoint; set => ((ADT.Models.IApiFlowOptionsInternal)ApiFlowOption).RemoteEndpointSettingEndpoint = value ?? null; } + /// Backing field for property. private ADT.Models.ISchema _schema; - /// The selected schema for this flow + /// + /// The selected schema for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] internal ADT.Models.ISchema Schema { get => (this._schema = this._schema ?? new ADT.Models.Schema()); set => this._schema = value; } @@ -478,17 +584,34 @@ public partial interface IPendingFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Optional field to override the audience of the remote endpoint", + Description = @"Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"audienceOverride", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance [ADT.Runtime.Info( Required = false, @@ -500,48 +623,60 @@ public partial interface IPendingFlow : SerializedName = @"cname", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Flag for if Azure Data Transfer API Flow should extract the user token", + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"identityTranslation", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote stub app registration Client ID", + Description = @"Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"remoteCallingModeClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Remote host to which communication needs to be made", + Description = @"Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.", SerializedName = @"remoteEndpoint", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Sender's app user assigned Manage Identity client ID", + Description = @"Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"senderClientId", PossibleTypes = new [] { typeof(string) })] string ApiFlowOptionSenderClientId { get; set; } @@ -611,14 +746,17 @@ public partial interface IPendingFlow : SerializedName = @"customerManagedKeyVaultUri", PossibleTypes = new [] { typeof(string) })] string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"Type of data to transfer via the flow.", + Description = @"Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] @@ -656,6 +794,18 @@ public partial interface IPendingFlow : SerializedName = @"eventHubId", PossibleTypes = new [] { typeof(string) })] string EventHubId { get; set; } + /// The Flow's data class. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The Flow's data class.", + SerializedName = @"flowDataType", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow [ADT.Runtime.Info( Required = false, @@ -667,14 +817,95 @@ public partial interface IPendingFlow : SerializedName = @"flowId", PossibleTypes = new [] { typeof(string) })] string FlowId { get; } - /// The flow type for this flow + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow type for this flow", + Description = @"A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the FlowProfile.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string FlowProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The name of the parent Pipeline Azure resource associated with this FlowProfile.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + string FlowProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string FlowProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string FlowProfileStatus { get; set; } + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -689,7 +920,7 @@ public partial interface IPendingFlow : Description = @"Force disablement status of the current flow", SerializedName = @"forceDisabledStatus", PossibleTypes = new [] { typeof(string) })] - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -761,6 +992,21 @@ public partial interface IPendingFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions", + SerializedName = @"performancePriority", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The name of the resource [ADT.Runtime.Info( Required = false, @@ -783,14 +1029,17 @@ public partial interface IPendingFlow : SerializedName = @"passphrase", PossibleTypes = new [] { typeof(string) })] string Passphrase { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this flow", + Description = @"The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -806,6 +1055,31 @@ public partial interface IPendingFlow : PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string RemoteEndpointSettingEndpoint { get; set; } /// Connection ID associated with this schema [ADT.Runtime.Info( Required = false, @@ -1136,18 +1410,40 @@ internal partial interface IPendingFlowInternal /// [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] string ApiFlowOptionApiMode { get; set; } - /// Optional field to override the audience of the remote endpoint + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// string ApiFlowOptionAudienceOverride { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List ApiFlowOptionAuthentication { get; set; } /// Unique CNAME to represent the Azure Data Transfer API Flow instance string ApiFlowOptionCname { get; set; } - /// Flag for if Azure Data Transfer API Flow should extract the user token + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] string ApiFlowOptionIdentityTranslation { get; set; } - /// Remote stub app registration Client ID + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionRemoteCallingModeClientId { get; set; } - /// Remote host to which communication needs to be made + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// string ApiFlowOptionRemoteEndpoint { get; set; } - /// Sender's app user assigned Manage Identity client ID + /// Defines the destination remote endpoint for the API calls. + ADT.Models.IRemoteEndpointSettings ApiFlowOptionRemoteEndpointSetting { get; set; } + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// string ApiFlowOptionSenderClientId { get; set; } /// The connection associated with this flow ADT.Models.ISelectedResource Connection { get; set; } @@ -1163,7 +1459,10 @@ internal partial interface IPendingFlowInternal string ConsumerGroup { get; set; } /// The URI to the customer managed key for this flow string CustomerManagedKeyVaultUri { get; set; } - /// Type of data to transfer via the flow. + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] string DataType { get; set; } /// The destination endpoints of the stream @@ -1172,13 +1471,45 @@ internal partial interface IPendingFlowInternal System.Collections.Generic.List DestinationEndpointPort { get; set; } /// Event Hub ID string EventHubId { get; set; } + /// The Flow's data class. + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + string FlowDataType { get; set; } /// Dataflow GUID associated with this flow string FlowId { get; set; } - /// The flow type for this flow + /// Type of FlowProfile to use for transfer via the flow. + ADT.Models.IFlowProfileMetadata FlowProfile { get; set; } + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + string FlowProfileDescription { get; set; } + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + string FlowProfileId { get; set; } + /// The name of the FlowProfile. + string FlowProfileName { get; set; } + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + string FlowProfilePipeline { get; set; } + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + string FlowProfileReplicationScenario { get; set; } + /// The operational status of the FlowProfile. + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + string FlowProfileStatus { get; set; } + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] string FlowType { get; set; } /// Force disablement status of the current flow - [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled")] + [global::ADT.PSArgumentCompleterAttribute("ConnectionForceDisabled", "FlowTypeForceDisabled", "PipelineForceDisabled")] System.Collections.Generic.List ForceDisabledStatus { get; set; } /// /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} @@ -1198,16 +1529,35 @@ internal partial interface IPendingFlowInternal /// Billing tier for this messaging flow [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] string MessagingOptionBillingTier { get; set; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + string MessagingOptionPerformancePriority { get; set; } /// The name of the resource string Name { get; set; } /// The passphrase used for SRT streams string Passphrase { get; set; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// Provisioning state of the flow [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] string ProvisioningState { get; set; } - /// The selected schema for this flow + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List RemoteEndpointSettingAuthentication { get; set; } + /// The remote endpoint uri all API calls. + string RemoteEndpointSettingEndpoint { get; set; } + /// + /// The selected schema for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// ADT.Models.ISchema Schema { get; set; } /// Connection ID associated with this schema string SchemaConnectionId { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.json.cs index 5d8225547fe9..ce5bbe0ccaae 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PendingFlow.json.cs @@ -76,6 +76,7 @@ internal PendingFlow(ADT.Runtime.Json.JsonObject json) return; } {_connection = If( json?.PropertyT("connection"), out var __jsonConnection) ? ADT.Models.SelectedResource.FromJson(__jsonConnection) : _connection;} + {_flowProfile = If( json?.PropertyT("flowProfile"), out var __jsonFlowProfile) ? ADT.Models.FlowProfileMetadata.FromJson(__jsonFlowProfile) : _flowProfile;} {_schema = If( json?.PropertyT("schema"), out var __jsonSchema) ? ADT.Models.Schema.FromJson(__jsonSchema) : _schema;} {_messagingOption = If( json?.PropertyT("messagingOptions"), out var __jsonMessagingOptions) ? ADT.Models.MessagingOptions.FromJson(__jsonMessagingOptions) : _messagingOption;} {_apiFlowOption = If( json?.PropertyT("apiFlowOptions"), out var __jsonApiFlowOptions) ? ADT.Models.ApiFlowOptions.FromJson(__jsonApiFlowOptions) : _apiFlowOption;} @@ -94,6 +95,7 @@ internal PendingFlow(ADT.Runtime.Json.JsonObject json) {_storageContainerName = If( json?.PropertyT("storageContainerName"), out var __jsonStorageContainerName) ? (string)__jsonStorageContainerName : (string)_storageContainerName;} {_storageTableName = If( json?.PropertyT("storageTableName"), out var __jsonStorageTableName) ? (string)__jsonStorageTableName : (string)_storageTableName;} {_serviceBusQueueId = If( json?.PropertyT("serviceBusQueueId"), out var __jsonServiceBusQueueId) ? (string)__jsonServiceBusQueueId : (string)_serviceBusQueueId;} + {_flowDataType = If( json?.PropertyT("flowDataType"), out var __jsonFlowDataType) ? (string)__jsonFlowDataType : (string)_flowDataType;} {_flowType = If( json?.PropertyT("flowType"), out var __jsonFlowType) ? (string)__jsonFlowType : (string)_flowType;} {_dataType = If( json?.PropertyT("dataType"), out var __jsonDataType) ? (string)__jsonDataType : (string)_dataType;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)_provisioningState;} @@ -135,6 +137,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A return container; } AddIf( null != this._connection ? (ADT.Runtime.Json.JsonNode) this._connection.ToJson(null,serializationMode) : null, "connection" ,container.Add ); + AddIf( null != this._flowProfile ? (ADT.Runtime.Json.JsonNode) this._flowProfile.ToJson(null,serializationMode) : null, "flowProfile" ,container.Add ); AddIf( null != this._schema ? (ADT.Runtime.Json.JsonNode) this._schema.ToJson(null,serializationMode) : null, "schema" ,container.Add ); AddIf( null != this._messagingOption ? (ADT.Runtime.Json.JsonNode) this._messagingOption.ToJson(null,serializationMode) : null, "messagingOptions" ,container.Add ); AddIf( null != this._apiFlowOption ? (ADT.Runtime.Json.JsonNode) this._apiFlowOption.ToJson(null,serializationMode) : null, "apiFlowOptions" ,container.Add ); @@ -182,6 +185,7 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A AddIf( null != (((object)this._storageContainerName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._storageContainerName.ToString()) : null, "storageContainerName" ,container.Add ); AddIf( null != (((object)this._storageTableName)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._storageTableName.ToString()) : null, "storageTableName" ,container.Add ); AddIf( null != (((object)this._serviceBusQueueId)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._serviceBusQueueId.ToString()) : null, "serviceBusQueueId" ,container.Add ); + AddIf( null != (((object)this._flowDataType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowDataType.ToString()) : null, "flowDataType" ,container.Add ); AddIf( null != (((object)this._flowType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._flowType.ToString()) : null, "flowType" ,container.Add ); AddIf( null != (((object)this._dataType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._dataType.ToString()) : null, "dataType" ,container.Add ); if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.PowerShell.cs index 87af26eb4993..018c98413df0 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// The pipeline resource definition. + /// + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. + /// [System.ComponentModel.TypeConverter(typeof(PipelineTypeConverter))] public partial class Pipeline { @@ -193,6 +196,10 @@ internal Pipeline(global::System.Collections.IDictionary content) { ((ADT.Models.IPipelineInternal)this).DisabledFlowType = (System.Collections.Generic.List) content.GetValueForProperty("DisabledFlowType",((ADT.Models.IPipelineInternal)this).DisabledFlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("DisabledDataClass")) + { + ((ADT.Models.IPipelineInternal)this).DisabledDataClass = (System.Collections.Generic.List) content.GetValueForProperty("DisabledDataClass",((ADT.Models.IPipelineInternal)this).DisabledDataClass, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("QuarantineDownloadStorageAccount")) { ((ADT.Models.IPipelineInternal)this).QuarantineDownloadStorageAccount = (string) content.GetValueForProperty("QuarantineDownloadStorageAccount",((ADT.Models.IPipelineInternal)this).QuarantineDownloadStorageAccount, global::System.Convert.ToString); @@ -326,6 +333,10 @@ internal Pipeline(global::System.Management.Automation.PSObject content) { ((ADT.Models.IPipelineInternal)this).DisabledFlowType = (System.Collections.Generic.List) content.GetValueForProperty("DisabledFlowType",((ADT.Models.IPipelineInternal)this).DisabledFlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("DisabledDataClass")) + { + ((ADT.Models.IPipelineInternal)this).DisabledDataClass = (System.Collections.Generic.List) content.GetValueForProperty("DisabledDataClass",((ADT.Models.IPipelineInternal)this).DisabledDataClass, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("QuarantineDownloadStorageAccount")) { ((ADT.Models.IPipelineInternal)this).QuarantineDownloadStorageAccount = (string) content.GetValueForProperty("QuarantineDownloadStorageAccount",((ADT.Models.IPipelineInternal)this).QuarantineDownloadStorageAccount, global::System.Convert.ToString); @@ -374,7 +385,8 @@ public override string ToString() return ToJsonString(); } } - /// The pipeline resource definition. + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. [System.ComponentModel.TypeConverter(typeof(PipelineTypeConverter))] public partial interface IPipeline diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.cs index 34f9e0c26757..848986c1c83b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The pipeline resource definition. + /// + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. + /// public partial class Pipeline : ADT.Models.IPipeline, ADT.Models.IPipelineInternal, @@ -68,6 +71,10 @@ public partial class Pipeline : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List Connection { get => ((ADT.Models.IPipelinePropertiesInternal)Property).Connection; } + /// The DataClasses that are disabled for this pipeline + [ADT.Origin(ADT.PropertyOrigin.Inlined)] + public System.Collections.Generic.List DisabledDataClass { get => ((ADT.Models.IPipelinePropertiesInternal)Property).DisabledDataClass; set => ((ADT.Models.IPipelinePropertiesInternal)Property).DisabledDataClass = value ?? null /* arrayOf */; } + /// The flow types that are disabled for this pipeline [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List DisabledFlowType { get => ((ADT.Models.IPipelinePropertiesInternal)Property).DisabledFlowType; set => ((ADT.Models.IPipelinePropertiesInternal)Property).DisabledFlowType = value ?? null /* arrayOf */; } @@ -76,7 +83,10 @@ public partial class Pipeline : [ADT.Origin(ADT.PropertyOrigin.Inlined)] public string DisplayName { get => ((ADT.Models.IPipelinePropertiesInternal)Property).DisplayName; set => ((ADT.Models.IPipelinePropertiesInternal)Property).DisplayName = value ?? null; } - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List FlowType { get => ((ADT.Models.IPipelinePropertiesInternal)Property).FlowType; set => ((ADT.Models.IPipelinePropertiesInternal)Property).FlowType = value ?? null /* arrayOf */; } @@ -127,14 +137,17 @@ public partial class Pipeline : [ADT.Origin(ADT.PropertyOrigin.Inherited)] public string Name { get => ((ADT.Models.IResourceInternal)__trackedResource).Name; } - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List Policy { get => ((ADT.Models.IPipelinePropertiesInternal)Property).Policy; set => ((ADT.Models.IPipelinePropertiesInternal)Property).Policy = value ?? null /* arrayOf */; } /// Backing field for property. private ADT.Models.IPipelineProperties _property; - /// Properties of pipeline + /// The set of configurable properties for the Pipeline resource. [ADT.Origin(ADT.PropertyOrigin.Owned)] internal ADT.Models.IPipelineProperties Property { get => (this._property = this._property ?? new ADT.Models.PipelineProperties()); set => this._property = value; } @@ -224,7 +237,8 @@ public Pipeline() await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); } } - /// The pipeline resource definition. + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. public partial interface IPipeline : ADT.Runtime.IJsonSerializable, ADT.Models.ITrackedResource @@ -240,6 +254,18 @@ public partial interface IPipeline : SerializedName = @"connections", PossibleTypes = new [] { typeof(ADT.Models.IReadPipelineConnection) })] System.Collections.Generic.List Connection { get; } + /// The DataClasses that are disabled for this pipeline + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DataClasses that are disabled for this pipeline", + SerializedName = @"disabledDataClass", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + System.Collections.Generic.List DisabledDataClass { get; set; } /// The flow types that are disabled for this pipeline [ADT.Runtime.Info( Required = false, @@ -263,14 +289,17 @@ public partial interface IPipeline : SerializedName = @"displayName", PossibleTypes = new [] { typeof(string) })] string DisplayName { get; set; } - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types allowed for this pipeline", + Description = @"The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -330,14 +359,17 @@ public partial interface IPipeline : SerializedName = @"userAssignedIdentities", PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this pipeline", + Description = @"The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -411,18 +443,25 @@ public partial interface IPipeline : System.Collections.Generic.List Subscriber { get; set; } } - /// The pipeline resource definition. + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. internal partial interface IPipelineInternal : ADT.Models.ITrackedResourceInternal { /// Connections associated with pipeline System.Collections.Generic.List Connection { get; set; } + /// The DataClasses that are disabled for this pipeline + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + System.Collections.Generic.List DisabledDataClass { get; set; } /// The flow types that are disabled for this pipeline [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List DisabledFlowType { get; set; } /// Display name of this pipeline string DisplayName { get; set; } - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } /// The managed service identities assigned to this resource. @@ -446,9 +485,12 @@ internal partial interface IPipelineInternal : /// The dictionary values can be empty objects ({}) in requests. /// ADT.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } - /// Properties of pipeline + /// The set of configurable properties for the Pipeline resource. ADT.Models.IPipelineProperties Property { get; set; } /// Provisioning state of the pipeline [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.json.cs index 38b26de4f12f..db94ec8bb2f1 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Pipeline.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The pipeline resource definition. + /// + /// The pipeline resource definition. A Pipeline defines the scope and identity under which data replication scenarios are + /// managed. + /// public partial class Pipeline { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.PowerShell.cs similarity index 72% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.PowerShell.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.PowerShell.cs index b05cefb8c527..43fc968f936c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.PowerShell.cs @@ -8,8 +8,8 @@ namespace ADT.Models using ADT.Runtime.PowerShell; /// Connection properties inside pipeline - [System.ComponentModel.TypeConverter(typeof(ReadPipelineConnectionPropertiesTypeConverter))] - public partial class ReadPipelineConnectionProperties + [System.ComponentModel.TypeConverter(typeof(PipelineConnectionPropertiesTypeConverter))] + public partial class PipelineConnectionProperties { /// @@ -63,40 +63,40 @@ public partial class ReadPipelineConnectionProperties partial void OverrideToString(ref string stringResult, ref bool returnNow); /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Collections.IDictionary content that should be used. - /// an instance of . - public static ADT.Models.IReadPipelineConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + /// an instance of . + public static ADT.Models.IPipelineConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ReadPipelineConnectionProperties(content); + return new PipelineConnectionProperties(content); } /// - /// Deserializes a into an instance of into an instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - /// an instance of . - public static ADT.Models.IReadPipelineConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + /// an instance of . + public static ADT.Models.IPipelineConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ReadPipelineConnectionProperties(content); + return new PipelineConnectionProperties(content); } /// - /// Creates a new instance of , deserializing the content from a json string. + /// 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 ADT.Models.IReadPipelineConnectionProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + /// an instance of the model class. + public static ADT.Models.IPipelineConnectionProperties FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ReadPipelineConnectionProperties(global::System.Collections.IDictionary content) + internal PipelineConnectionProperties(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,7 +107,7 @@ internal ReadPipelineConnectionProperties(global::System.Collections.IDictionary // actually deserialize if (content.Contains("InternalMetadata")) { - ((ADT.Models.IReadPipelineConnectionPropertiesInternal)this).InternalMetadata = (ADT.Models.IReadInternalMetadataProperties) content.GetValueForProperty("InternalMetadata",((ADT.Models.IReadPipelineConnectionPropertiesInternal)this).InternalMetadata, ADT.Models.ReadInternalMetadataPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IPipelineConnectionPropertiesInternal)this).InternalMetadata = (ADT.Models.IInternalMetadataProperties) content.GetValueForProperty("InternalMetadata",((ADT.Models.IPipelineConnectionPropertiesInternal)this).InternalMetadata, ADT.Models.InternalMetadataPropertiesTypeConverter.ConvertFrom); } // this type is a dictionary; copy elements from source to here. CopyFrom(content); @@ -115,11 +115,11 @@ internal ReadPipelineConnectionProperties(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. - internal ReadPipelineConnectionProperties(global::System.Management.Automation.PSObject content) + internal PipelineConnectionProperties(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -130,7 +130,7 @@ internal ReadPipelineConnectionProperties(global::System.Management.Automation.P // actually deserialize if (content.Contains("InternalMetadata")) { - ((ADT.Models.IReadPipelineConnectionPropertiesInternal)this).InternalMetadata = (ADT.Models.IReadInternalMetadataProperties) content.GetValueForProperty("InternalMetadata",((ADT.Models.IReadPipelineConnectionPropertiesInternal)this).InternalMetadata, ADT.Models.ReadInternalMetadataPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IPipelineConnectionPropertiesInternal)this).InternalMetadata = (ADT.Models.IInternalMetadataProperties) content.GetValueForProperty("InternalMetadata",((ADT.Models.IPipelineConnectionPropertiesInternal)this).InternalMetadata, ADT.Models.InternalMetadataPropertiesTypeConverter.ConvertFrom); } // this type is a dictionary; copy elements from source to here. CopyFrom(content); @@ -155,8 +155,8 @@ public override string ToString() } } /// Connection properties inside pipeline - [System.ComponentModel.TypeConverter(typeof(ReadPipelineConnectionPropertiesTypeConverter))] - public partial interface IReadPipelineConnectionProperties + [System.ComponentModel.TypeConverter(typeof(PipelineConnectionPropertiesTypeConverter))] + public partial interface IPipelineConnectionProperties { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.TypeConverter.cs new file mode 100644 index 000000000000..422f8fc3c832 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PipelineConnectionPropertiesTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IPipelineConnectionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IPipelineConnectionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PipelineConnectionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PipelineConnectionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PipelineConnectionProperties.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.cs new file mode 100644 index 000000000000..b2978a3c61d9 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.cs @@ -0,0 +1,58 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Connection properties inside pipeline + public partial class PipelineConnectionProperties : + ADT.Models.IPipelineConnectionProperties, + ADT.Models.IPipelineConnectionPropertiesInternal + { + + /// Internal Acessors for InternalMetadata + ADT.Models.IInternalMetadataProperties ADT.Models.IPipelineConnectionPropertiesInternal.InternalMetadata { get => (this._internalMetadata = this._internalMetadata ?? new ADT.Models.InternalMetadataProperties()); set { {_internalMetadata = value;} } } + + /// Backing field for property. + private ADT.Models.IInternalMetadataProperties _internalMetadata; + + /// Internal metadata of the connection inside pipeline. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public ADT.Models.IInternalMetadataProperties InternalMetadata { get => (this._internalMetadata = this._internalMetadata ?? new ADT.Models.InternalMetadataProperties()); } + + /// Creates an new instance. + public PipelineConnectionProperties() + { + + } + } + /// Connection properties inside pipeline + public partial interface IPipelineConnectionProperties : + ADT.Runtime.IJsonSerializable, + ADT.Runtime.IAssociativeArray + { + /// Internal metadata of the connection inside pipeline. + [ADT.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"Internal metadata of the connection inside pipeline.", + SerializedName = @"internalMetadata", + PossibleTypes = new [] { typeof(ADT.Models.IInternalMetadataProperties) })] + ADT.Models.IInternalMetadataProperties InternalMetadata { get; } + + } + /// Connection properties inside pipeline + internal partial interface IPipelineConnectionPropertiesInternal + + { + /// Internal metadata of the connection inside pipeline. + ADT.Models.IInternalMetadataProperties InternalMetadata { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.dictionary.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.dictionary.cs similarity index 96% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.dictionary.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.dictionary.cs index d4c6f74f0575..e643eb8850e2 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.dictionary.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.dictionary.cs @@ -7,7 +7,7 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - public partial class ReadPipelineConnectionProperties : + public partial class PipelineConnectionProperties : ADT.Runtime.IAssociativeArray { protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(ADT.Models.ReadPipelineConnectionProperties source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(ADT.Models.PipelineConnectionProperties source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.json.cs similarity index 80% rename from generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.json.cs rename to generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.json.cs index bcbc05118c43..723df6978978 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineConnectionProperties.json.cs @@ -8,7 +8,7 @@ namespace ADT.Models using static ADT.Runtime.Extensions; /// Connection properties inside pipeline - public partial class ReadPipelineConnectionProperties + public partial class PipelineConnectionProperties { /// @@ -54,21 +54,21 @@ public partial class ReadPipelineConnectionProperties partial void BeforeToJson(ref ADT.Runtime.Json.JsonObject container, ref bool returnNow); /// - /// Deserializes a into an instance of ADT.Models.IReadPipelineConnectionProperties. + /// Deserializes a into an instance of ADT.Models.IPipelineConnectionProperties. /// /// a to deserialize from. - /// an instance of ADT.Models.IReadPipelineConnectionProperties. - public static ADT.Models.IReadPipelineConnectionProperties FromJson(ADT.Runtime.Json.JsonNode node) + /// an instance of ADT.Models.IPipelineConnectionProperties. + public static ADT.Models.IPipelineConnectionProperties FromJson(ADT.Runtime.Json.JsonNode node) { - return node is ADT.Runtime.Json.JsonObject json ? new ReadPipelineConnectionProperties(json, new global::System.Collections.Generic.HashSet(){ @"internalMetadata" }) : null; + return node is ADT.Runtime.Json.JsonObject json ? new PipelineConnectionProperties(json, new global::System.Collections.Generic.HashSet(){ @"internalMetadata" }) : null; } /// - /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . /// /// A ADT.Runtime.Json.JsonObject instance to deserialize from. /// - internal ReadPipelineConnectionProperties(ADT.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + internal PipelineConnectionProperties(ADT.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -77,18 +77,18 @@ internal ReadPipelineConnectionProperties(ADT.Runtime.Json.JsonObject json, glob return; } ADT.Runtime.JsonSerializable.FromJson( json, ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, ADT.Runtime.JsonSerializable.DeserializeDictionary(()=>new global::System.Collections.Generic.Dictionary()),exclusions ); - {_internalMetadata = If( json?.PropertyT("internalMetadata"), out var __jsonInternalMetadata) ? ADT.Models.ReadInternalMetadataProperties.FromJson(__jsonInternalMetadata) : _internalMetadata;} + {_internalMetadata = If( json?.PropertyT("internalMetadata"), out var __jsonInternalMetadata) ? ADT.Models.InternalMetadataProperties.FromJson(__jsonInternalMetadata) : _internalMetadata;} AfterFromJson(json); } /// - /// Serializes this instance of into a . + /// 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 . + /// a serialized instance of as a . /// public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) { @@ -101,7 +101,10 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A return container; } ADT.Runtime.JsonSerializable.ToJson( ((ADT.Runtime.IAssociativeArray)this).AdditionalProperties, container); - AddIf( null != this._internalMetadata ? (ADT.Runtime.Json.JsonNode) this._internalMetadata.ToJson(null,serializationMode) : null, "internalMetadata" ,container.Add ); + if (serializationMode.HasFlag(ADT.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != this._internalMetadata ? (ADT.Runtime.Json.JsonNode) this._internalMetadata.ToJson(null,serializationMode) : null, "internalMetadata" ,container.Add ); + } AfterToJson(ref container); return container; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.PowerShell.cs index 955c46bf468f..308fb9ac86b2 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.PowerShell.cs @@ -137,6 +137,10 @@ internal PipelineProperties(global::System.Collections.IDictionary content) { ((ADT.Models.IPipelinePropertiesInternal)this).DisabledFlowType = (System.Collections.Generic.List) content.GetValueForProperty("DisabledFlowType",((ADT.Models.IPipelinePropertiesInternal)this).DisabledFlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("DisabledDataClass")) + { + ((ADT.Models.IPipelinePropertiesInternal)this).DisabledDataClass = (System.Collections.Generic.List) content.GetValueForProperty("DisabledDataClass",((ADT.Models.IPipelinePropertiesInternal)this).DisabledDataClass, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("QuarantineDownloadStorageAccount")) { ((ADT.Models.IPipelinePropertiesInternal)this).QuarantineDownloadStorageAccount = (string) content.GetValueForProperty("QuarantineDownloadStorageAccount",((ADT.Models.IPipelinePropertiesInternal)this).QuarantineDownloadStorageAccount, global::System.Convert.ToString); @@ -198,6 +202,10 @@ internal PipelineProperties(global::System.Management.Automation.PSObject conten { ((ADT.Models.IPipelinePropertiesInternal)this).DisabledFlowType = (System.Collections.Generic.List) content.GetValueForProperty("DisabledFlowType",((ADT.Models.IPipelinePropertiesInternal)this).DisabledFlowType, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); } + if (content.Contains("DisabledDataClass")) + { + ((ADT.Models.IPipelinePropertiesInternal)this).DisabledDataClass = (System.Collections.Generic.List) content.GetValueForProperty("DisabledDataClass",((ADT.Models.IPipelinePropertiesInternal)this).DisabledDataClass, __y => TypeConverterExtensions.SelectToList(__y, global::System.Convert.ToString)); + } if (content.Contains("QuarantineDownloadStorageAccount")) { ((ADT.Models.IPipelinePropertiesInternal)this).QuarantineDownloadStorageAccount = (string) content.GetValueForProperty("QuarantineDownloadStorageAccount",((ADT.Models.IPipelinePropertiesInternal)this).QuarantineDownloadStorageAccount, global::System.Convert.ToString); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.cs index de56644069b1..cf4b46dafb12 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.cs @@ -26,6 +26,13 @@ public partial class PipelineProperties : [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Connection { get => this._connection; } + /// Backing field for property. + private System.Collections.Generic.List _disabledDataClass; + + /// The DataClasses that are disabled for this pipeline + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List DisabledDataClass { get => this._disabledDataClass; set => this._disabledDataClass = value; } + /// Backing field for property. private System.Collections.Generic.List _disabledFlowType; @@ -43,14 +50,20 @@ public partial class PipelineProperties : /// Backing field for property. private System.Collections.Generic.List _flowType; - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List FlowType { get => this._flowType; set => this._flowType = value; } /// Backing field for property. private System.Collections.Generic.List _policy; - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List Policy { get => this._policy; set => this._policy = value; } @@ -117,6 +130,18 @@ public partial interface IPipelineProperties : SerializedName = @"connections", PossibleTypes = new [] { typeof(ADT.Models.IReadPipelineConnection) })] System.Collections.Generic.List Connection { get; } + /// The DataClasses that are disabled for this pipeline + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The DataClasses that are disabled for this pipeline", + SerializedName = @"disabledDataClass", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + System.Collections.Generic.List DisabledDataClass { get; set; } /// The flow types that are disabled for this pipeline [ADT.Runtime.Info( Required = false, @@ -140,26 +165,32 @@ public partial interface IPipelineProperties : SerializedName = @"displayName", PossibleTypes = new [] { typeof(string) })] string DisplayName { get; set; } - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types allowed for this pipeline", + Description = @"The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The policies for this pipeline", + Description = @"The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] System.Collections.Generic.List Policy { get; set; } @@ -239,15 +270,24 @@ internal partial interface IPipelinePropertiesInternal { /// Connections associated with pipeline System.Collections.Generic.List Connection { get; set; } + /// The DataClasses that are disabled for this pipeline + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + System.Collections.Generic.List DisabledDataClass { get; set; } /// The flow types that are disabled for this pipeline [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List DisabledFlowType { get; set; } /// Display name of this pipeline string DisplayName { get; set; } - /// The flow types allowed for this pipeline + /// + /// The flow type for this flow. The flowTypes property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } - /// The policies for this pipeline + /// + /// The policies for this pipeline. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// System.Collections.Generic.List Policy { get; set; } /// Provisioning state of the pipeline [global::ADT.PSArgumentCompleterAttribute("Succeeded", "Failed", "Canceled", "Accepted")] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.json.cs index 9d4f261e7ecb..2da5d7424255 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelineProperties.json.cs @@ -83,6 +83,7 @@ internal PipelineProperties(ADT.Runtime.Json.JsonObject json) {_policy = If( json?.PropertyT("policies"), out var __jsonPolicies) ? If( __jsonPolicies as ADT.Runtime.Json.JsonArray, out var __l) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is ADT.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : _policy;} {_flowType = If( json?.PropertyT("flowTypes"), out var __jsonFlowTypes) ? If( __jsonFlowTypes as ADT.Runtime.Json.JsonArray, out var __g) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is ADT.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : _flowType;} {_disabledFlowType = If( json?.PropertyT("disabledFlowTypes"), out var __jsonDisabledFlowTypes) ? If( __jsonDisabledFlowTypes as ADT.Runtime.Json.JsonArray, out var __b) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is ADT.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : _disabledFlowType;} + {_disabledDataClass = If( json?.PropertyT("disabledDataClass"), out var __jsonDisabledDataClass) ? If( __jsonDisabledDataClass as ADT.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is ADT.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : _disabledDataClass;} {_quarantineDownloadStorageAccount = If( json?.PropertyT("quarantineDownloadStorageAccount"), out var __jsonQuarantineDownloadStorageAccount) ? (string)__jsonQuarantineDownloadStorageAccount : (string)_quarantineDownloadStorageAccount;} {_quarantineDownloadStorageContainer = If( json?.PropertyT("quarantineDownloadStorageContainer"), out var __jsonQuarantineDownloadStorageContainer) ? (string)__jsonQuarantineDownloadStorageContainer : (string)_quarantineDownloadStorageContainer;} {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)_status;} @@ -162,6 +163,15 @@ public ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, A } container.Add("disabledFlowTypes",__c); } + if (null != this._disabledDataClass) + { + var ___x = new ADT.Runtime.Json.XNodeArray(); + foreach( var ___y in this._disabledDataClass ) + { + AddIf(null != (((object)___y)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + } + container.Add("disabledDataClass",___x); + } AddIf( null != (((object)this._quarantineDownloadStorageAccount)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._quarantineDownloadStorageAccount.ToString()) : null, "quarantineDownloadStorageAccount" ,container.Add ); AddIf( null != (((object)this._quarantineDownloadStorageContainer)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._quarantineDownloadStorageContainer.ToString()) : null, "quarantineDownloadStorageContainer" ,container.Add ); AddIf( null != (((object)this._status)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatch.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatch.cs index 0061686c1486..fd974831d369 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatch.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatch.cs @@ -25,7 +25,10 @@ public partial class PipelinesPatch : /// Internal Acessors for Property ADT.Models.IPipelinesPatchProperties ADT.Models.IPipelinesPatchInternal.Property { get => (this._property = this._property ?? new ADT.Models.PipelinesPatchProperties()); set { {_property = value;} } } - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Inlined)] public System.Collections.Generic.List FlowType { get => ((ADT.Models.IPipelinesPatchPropertiesInternal)Property).FlowType; set => ((ADT.Models.IPipelinesPatchPropertiesInternal)Property).FlowType = value ?? null /* arrayOf */; } @@ -86,14 +89,17 @@ public PipelinesPatch() public partial interface IPipelinesPatch : ADT.Runtime.IJsonSerializable { - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types allowed for this pipeline", + Description = @"The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. Please create and use the FlowProfile property instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -170,7 +176,10 @@ public partial interface IPipelinesPatch : internal partial interface IPipelinesPatchInternal { - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } /// The managed service identities assigned to this resource. diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.PowerShell.cs index 807cbf7821b3..6489b0c83e25 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// Properties of pipelines patch body. + /// + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. + /// [System.ComponentModel.TypeConverter(typeof(PipelinesPatchPropertiesTypeConverter))] public partial class PipelinesPatchProperties { @@ -150,7 +153,8 @@ public override string ToString() return ToJsonString(); } } - /// Properties of pipelines patch body. + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. [System.ComponentModel.TypeConverter(typeof(PipelinesPatchPropertiesTypeConverter))] public partial interface IPipelinesPatchProperties diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.cs index 449f69745650..4699261e361f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// Properties of pipelines patch body. + /// + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. + /// public partial class PipelinesPatchProperties : ADT.Models.IPipelinesPatchProperties, ADT.Models.IPipelinesPatchPropertiesInternal @@ -16,7 +19,10 @@ public partial class PipelinesPatchProperties : /// Backing field for property. private System.Collections.Generic.List _flowType; - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [ADT.Origin(ADT.PropertyOrigin.Owned)] public System.Collections.Generic.List FlowType { get => this._flowType; set => this._flowType = value; } @@ -26,29 +32,37 @@ public PipelinesPatchProperties() } } - /// Properties of pipelines patch body. + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. public partial interface IPipelinesPatchProperties : ADT.Runtime.IJsonSerializable { - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [ADT.Runtime.Info( Required = false, ReadOnly = false, Read = true, Create = true, Update = true, - Description = @"The flow types allowed for this pipeline", + Description = @"The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. Please create and use the FlowProfile property instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } } - /// Properties of pipelines patch body. + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. internal partial interface IPipelinesPatchPropertiesInternal { - /// The flow types allowed for this pipeline + /// + /// The flow types allowed for this pipeline. FlowTypes has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile property instead. + /// [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] System.Collections.Generic.List FlowType { get; set; } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.json.cs index 4f94117cc8d6..76139ef7a472 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/PipelinesPatchProperties.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// Properties of pipelines patch body. + /// + /// Properties of pipelines patch body. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the FlowProfile resource instead. + /// public partial class PipelinesPatchProperties { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.PowerShell.cs index bd0a4a963daa..0b4c73ded5f3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.PowerShell.cs @@ -7,6 +7,7 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; + /// The ReadPipelineconnection. [System.ComponentModel.TypeConverter(typeof(ReadPipelineConnectionTypeConverter))] public partial class ReadPipelineConnection { @@ -130,7 +131,7 @@ internal ReadPipelineConnection(global::System.Collections.IDictionary content) } if (content.Contains("Property")) { - ((ADT.Models.IReadPipelineConnectionInternal)this).Property = (ADT.Models.IReadPipelineConnectionProperties) content.GetValueForProperty("Property",((ADT.Models.IReadPipelineConnectionInternal)this).Property, ADT.Models.ReadPipelineConnectionPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IReadPipelineConnectionInternal)this).Property = (ADT.Models.IPipelineConnectionProperties) content.GetValueForProperty("Property",((ADT.Models.IReadPipelineConnectionInternal)this).Property, ADT.Models.PipelineConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -201,7 +202,7 @@ internal ReadPipelineConnection(global::System.Management.Automation.PSObject co } if (content.Contains("Property")) { - ((ADT.Models.IReadPipelineConnectionInternal)this).Property = (ADT.Models.IReadPipelineConnectionProperties) content.GetValueForProperty("Property",((ADT.Models.IReadPipelineConnectionInternal)this).Property, ADT.Models.ReadPipelineConnectionPropertiesTypeConverter.ConvertFrom); + ((ADT.Models.IReadPipelineConnectionInternal)this).Property = (ADT.Models.IPipelineConnectionProperties) content.GetValueForProperty("Property",((ADT.Models.IReadPipelineConnectionInternal)this).Property, ADT.Models.PipelineConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("SystemDataCreatedBy")) { @@ -249,6 +250,7 @@ public override string ToString() return ToJsonString(); } } + /// The ReadPipelineconnection. [System.ComponentModel.TypeConverter(typeof(ReadPipelineConnectionTypeConverter))] public partial interface IReadPipelineConnection diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.cs index 9296fe3ea2fe..14939d13555e 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.cs @@ -7,6 +7,7 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; + /// The ReadPipelineconnection. public partial class ReadPipelineConnection : ADT.Models.IReadPipelineConnection, ADT.Models.IReadPipelineConnectionInternal @@ -62,11 +63,11 @@ public partial class ReadPipelineConnection : public string Name { get => this._name; set => this._name = value; } /// Backing field for property. - private ADT.Models.IReadPipelineConnectionProperties _property; + private ADT.Models.IPipelineConnectionProperties _property; /// Connection properties inside pipeline [ADT.Origin(ADT.PropertyOrigin.Owned)] - public ADT.Models.IReadPipelineConnectionProperties Property { get => (this._property = this._property ?? new ADT.Models.ReadPipelineConnectionProperties()); set => this._property = value; } + public ADT.Models.IPipelineConnectionProperties Property { get => (this._property = this._property ?? new ADT.Models.PipelineConnectionProperties()); set => this._property = value; } /// Backing field for property. private ADT.Models.ISystemData _systemData; @@ -112,6 +113,7 @@ public ReadPipelineConnection() } } + /// The ReadPipelineconnection. public partial interface IReadPipelineConnection : ADT.Runtime.IJsonSerializable, ADT.Runtime.IAssociativeArray @@ -169,8 +171,8 @@ public partial interface IReadPipelineConnection : Update = true, Description = @"Connection properties inside pipeline", SerializedName = @"properties", - PossibleTypes = new [] { typeof(ADT.Models.IReadPipelineConnectionProperties) })] - ADT.Models.IReadPipelineConnectionProperties Property { get; set; } + PossibleTypes = new [] { typeof(ADT.Models.IPipelineConnectionProperties) })] + ADT.Models.IPipelineConnectionProperties Property { get; set; } /// The timestamp of resource creation (UTC). [ADT.Runtime.Info( Required = false, @@ -252,6 +254,7 @@ public partial interface IReadPipelineConnection : string Type { get; set; } } + /// The ReadPipelineconnection. internal partial interface IReadPipelineConnectionInternal { @@ -264,7 +267,7 @@ internal partial interface IReadPipelineConnectionInternal /// Connection name inside pipeline string Name { get; set; } /// Connection properties inside pipeline - ADT.Models.IReadPipelineConnectionProperties Property { get; set; } + ADT.Models.IPipelineConnectionProperties Property { get; set; } /// Metadata pertaining to creation and last modification of the resource. ADT.Models.ISystemData SystemData { get; set; } /// The timestamp of resource creation (UTC). diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.json.cs index 32b10a8f1345..1cf7a2b86fea 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnection.json.cs @@ -7,6 +7,7 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; + /// The ReadPipelineconnection. public partial class ReadPipelineConnection { @@ -82,7 +83,7 @@ internal ReadPipelineConnection(ADT.Runtime.Json.JsonObject json, global::System {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)_location;} {_etag = If( json?.PropertyT("etag"), out var __jsonEtag) ? (string)__jsonEtag : (string)_etag;} - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? ADT.Models.ReadPipelineConnectionProperties.FromJson(__jsonProperties) : _property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? ADT.Models.PipelineConnectionProperties.FromJson(__jsonProperties) : _property;} AfterFromJson(json); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.cs deleted file mode 100644 index a44783311744..000000000000 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ReadPipelineConnectionProperties.cs +++ /dev/null @@ -1,55 +0,0 @@ -// 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 ADT.Models -{ - using static ADT.Runtime.Extensions; - - /// Connection properties inside pipeline - public partial class ReadPipelineConnectionProperties : - ADT.Models.IReadPipelineConnectionProperties, - ADT.Models.IReadPipelineConnectionPropertiesInternal - { - - /// Backing field for property. - private ADT.Models.IReadInternalMetadataProperties _internalMetadata; - - /// Internal metadata of the connection inside pipeline. - [ADT.Origin(ADT.PropertyOrigin.Owned)] - public ADT.Models.IReadInternalMetadataProperties InternalMetadata { get => (this._internalMetadata = this._internalMetadata ?? new ADT.Models.ReadInternalMetadataProperties()); set => this._internalMetadata = value; } - - /// Creates an new instance. - public ReadPipelineConnectionProperties() - { - - } - } - /// Connection properties inside pipeline - public partial interface IReadPipelineConnectionProperties : - ADT.Runtime.IJsonSerializable, - ADT.Runtime.IAssociativeArray - { - /// Internal metadata of the connection inside pipeline. - [ADT.Runtime.Info( - Required = false, - ReadOnly = false, - Read = true, - Create = true, - Update = true, - Description = @"Internal metadata of the connection inside pipeline.", - SerializedName = @"internalMetadata", - PossibleTypes = new [] { typeof(ADT.Models.IReadInternalMetadataProperties) })] - ADT.Models.IReadInternalMetadataProperties InternalMetadata { get; set; } - - } - /// Connection properties inside pipeline - internal partial interface IReadPipelineConnectionPropertiesInternal - - { - /// Internal metadata of the connection inside pipeline. - ADT.Models.IReadInternalMetadataProperties InternalMetadata { get; set; } - - } -} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.PowerShell.cs new file mode 100644 index 000000000000..74f01153e8b6 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.PowerShell.cs @@ -0,0 +1,168 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Properties to configure the destination remote endpoint for API calls. + [System.ComponentModel.TypeConverter(typeof(RemoteEndpointSettingsTypeConverter))] + public partial class RemoteEndpointSettings + { + + /// + /// 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 ADT.Models.IRemoteEndpointSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RemoteEndpointSettings(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IRemoteEndpointSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RemoteEndpointSettings(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 ADT.Models.IRemoteEndpointSettings FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RemoteEndpointSettings(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((ADT.Models.IRemoteEndpointSettingsInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((ADT.Models.IRemoteEndpointSettingsInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("Authentication")) + { + ((ADT.Models.IRemoteEndpointSettingsInternal)this).Authentication = (System.Collections.Generic.List) content.GetValueForProperty("Authentication",((ADT.Models.IRemoteEndpointSettingsInternal)this).Authentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RemoteEndpointSettings(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Endpoint")) + { + ((ADT.Models.IRemoteEndpointSettingsInternal)this).Endpoint = (string) content.GetValueForProperty("Endpoint",((ADT.Models.IRemoteEndpointSettingsInternal)this).Endpoint, global::System.Convert.ToString); + } + if (content.Contains("Authentication")) + { + ((ADT.Models.IRemoteEndpointSettingsInternal)this).Authentication = (System.Collections.Generic.List) content.GetValueForProperty("Authentication",((ADT.Models.IRemoteEndpointSettingsInternal)this).Authentication, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.AuthenticationTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, ADT.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(); + } + } + /// Properties to configure the destination remote endpoint for API calls. + [System.ComponentModel.TypeConverter(typeof(RemoteEndpointSettingsTypeConverter))] + public partial interface IRemoteEndpointSettings + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.TypeConverter.cs new file mode 100644 index 000000000000..2d4690825a62 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RemoteEndpointSettingsTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IRemoteEndpointSettings ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IRemoteEndpointSettings).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RemoteEndpointSettings.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RemoteEndpointSettings.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RemoteEndpointSettings.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.cs new file mode 100644 index 000000000000..5a9f58c3233c --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.cs @@ -0,0 +1,83 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Properties to configure the destination remote endpoint for API calls. + public partial class RemoteEndpointSettings : + ADT.Models.IRemoteEndpointSettings, + ADT.Models.IRemoteEndpointSettingsInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _authentication; + + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Authentication { get => this._authentication; set => this._authentication = value; } + + /// Backing field for property. + private string _endpoint; + + /// The remote endpoint uri all API calls. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// Creates an new instance. + public RemoteEndpointSettings() + { + + } + } + /// Properties to configure the destination remote endpoint for API calls. + public partial interface IRemoteEndpointSettings : + ADT.Runtime.IJsonSerializable + { + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + System.Collections.Generic.List Authentication { get; set; } + /// The remote endpoint uri all API calls. + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + string Endpoint { get; set; } + + } + /// Properties to configure the destination remote endpoint for API calls. + internal partial interface IRemoteEndpointSettingsInternal + + { + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + System.Collections.Generic.List Authentication { get; set; } + /// The remote endpoint uri all API calls. + string Endpoint { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.json.cs new file mode 100644 index 000000000000..4d47ae867571 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/RemoteEndpointSettings.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Properties to configure the destination remote endpoint for API calls. + public partial class RemoteEndpointSettings + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.IRemoteEndpointSettings. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IRemoteEndpointSettings. + public static ADT.Models.IRemoteEndpointSettings FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new RemoteEndpointSettings(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal RemoteEndpointSettings(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_endpoint = If( json?.PropertyT("endpoint"), out var __jsonEndpoint) ? (string)__jsonEndpoint : (string)_endpoint;} + {_authentication = If( json?.PropertyT("authentication"), out var __jsonAuthentication) ? If( __jsonAuthentication as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(ADT.Models.IAuthentication) (ADT.Models.Authentication.FromJson(__u) )) ))() : null : _authentication;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._endpoint)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._endpoint.ToString()) : null, "endpoint" ,container.Add ); + if (null != this._authentication) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._authentication ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("authentication",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.PowerShell.cs index 3cece657703b..2a574be0782b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// The schema object. + /// + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. + /// [System.ComponentModel.TypeConverter(typeof(SchemaTypeConverter))] public partial class Schema { @@ -206,7 +209,8 @@ public override string ToString() return ToJsonString(); } } - /// The schema object. + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. [System.ComponentModel.TypeConverter(typeof(SchemaTypeConverter))] public partial interface ISchema diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.cs index 468235b5f3c7..eaa7250d4c0e 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The schema object. + /// + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. + /// public partial class Schema : ADT.Models.ISchema, ADT.Models.ISchemaInternal @@ -75,7 +78,8 @@ public Schema() } } - /// The schema object. + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. public partial interface ISchema : ADT.Runtime.IJsonSerializable { @@ -172,7 +176,8 @@ public partial interface ISchema : string Uri { get; set; } } - /// The schema object. + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. internal partial interface ISchemaInternal { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.json.cs index a307529844fa..50004883919b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/Schema.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The schema object. + /// + /// The schema object. Schemas has reached end of life support starting version 2025-05-30-preview. Please manage schemas + /// with a FlowProfile resource instead. + /// public partial class Schema { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.PowerShell.cs index 046ce4cb5056..f1fc557712c9 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// The schemas list result. + /// + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. + /// [System.ComponentModel.TypeConverter(typeof(SchemasListResultTypeConverter))] public partial class SchemasListResult { @@ -150,7 +153,8 @@ public override string ToString() return ToJsonString(); } } - /// The schemas list result. + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. [System.ComponentModel.TypeConverter(typeof(SchemasListResultTypeConverter))] public partial interface ISchemasListResult diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.cs index 6202018bc59d..9ebb0f77882f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The schemas list result. + /// + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. + /// public partial class SchemasListResult : ADT.Models.ISchemasListResult, ADT.Models.ISchemasListResultInternal @@ -26,7 +29,8 @@ public SchemasListResult() } } - /// The schemas list result. + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. public partial interface ISchemasListResult : ADT.Runtime.IJsonSerializable { @@ -43,7 +47,8 @@ public partial interface ISchemasListResult : System.Collections.Generic.List Value { get; set; } } - /// The schemas list result. + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. internal partial interface ISchemasListResultInternal { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.json.cs index f67249e902f4..ffb4d948be8b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/SchemasListResult.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// The schemas list result. + /// + /// The schemas list result. SchemaListResults has reached end of life support starting version 2025-05-30-preview. Please + /// manage schemas with a FlowProfile resource instead. + /// public partial class SchemasListResult { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.PowerShell.cs new file mode 100644 index 000000000000..62aa6f4e6711 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + /// + [System.ComponentModel.TypeConverter(typeof(TextMatchTypeConverter))] + public partial class TextMatch + { + + /// + /// 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 ADT.Models.ITextMatch DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TextMatch(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.ITextMatch DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TextMatch(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 ADT.Models.ITextMatch FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TextMatch(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Text")) + { + ((ADT.Models.ITextMatchInternal)this).Text = (string) content.GetValueForProperty("Text",((ADT.Models.ITextMatchInternal)this).Text, global::System.Convert.ToString); + } + if (content.Contains("MatchType")) + { + ((ADT.Models.ITextMatchInternal)this).MatchType = (string) content.GetValueForProperty("MatchType",((ADT.Models.ITextMatchInternal)this).MatchType, global::System.Convert.ToString); + } + if (content.Contains("CaseSensitivity")) + { + ((ADT.Models.ITextMatchInternal)this).CaseSensitivity = (string) content.GetValueForProperty("CaseSensitivity",((ADT.Models.ITextMatchInternal)this).CaseSensitivity, 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 TextMatch(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Text")) + { + ((ADT.Models.ITextMatchInternal)this).Text = (string) content.GetValueForProperty("Text",((ADT.Models.ITextMatchInternal)this).Text, global::System.Convert.ToString); + } + if (content.Contains("MatchType")) + { + ((ADT.Models.ITextMatchInternal)this).MatchType = (string) content.GetValueForProperty("MatchType",((ADT.Models.ITextMatchInternal)this).MatchType, global::System.Convert.ToString); + } + if (content.Contains("CaseSensitivity")) + { + ((ADT.Models.ITextMatchInternal)this).CaseSensitivity = (string) content.GetValueForProperty("CaseSensitivity",((ADT.Models.ITextMatchInternal)this).CaseSensitivity, 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, ADT.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(); + } + } + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + [System.ComponentModel.TypeConverter(typeof(TextMatchTypeConverter))] + public partial interface ITextMatch + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.TypeConverter.cs new file mode 100644 index 000000000000..a92b86436d0d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TextMatchTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.ITextMatch ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.ITextMatch).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TextMatch.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TextMatch.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TextMatch.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.cs new file mode 100644 index 000000000000..ae7277a51224 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + /// + public partial class TextMatch : + ADT.Models.ITextMatch, + ADT.Models.ITextMatchInternal + { + + /// Backing field for property. + private string _caseSensitivity; + + /// + /// Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string CaseSensitivity { get => this._caseSensitivity; set => this._caseSensitivity = value; } + + /// Backing field for property. + private string _matchType; + + /// + /// Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string MatchType { get => this._matchType; set => this._matchType = value; } + + /// Backing field for property. + private string _text; + + /// + /// The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Text { get => this._text; set => this._text = value; } + + /// Creates an new instance. + public TextMatch() + { + + } + } + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + public partial interface ITextMatch : + ADT.Runtime.IJsonSerializable + { + /// + /// Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the text matching conditions based on casing. For more detail please refer to the Casing model.", + SerializedName = @"caseSensitivity", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Insensitive", "Sensitive")] + string CaseSensitivity { get; set; } + /// + /// Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model.", + SerializedName = @"matchType", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Partial", "Complete")] + string MatchType { get; set; } + /// + /// The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. + /// + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring.", + SerializedName = @"text", + PossibleTypes = new [] { typeof(string) })] + string Text { get; set; } + + } + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + internal partial interface ITextMatchInternal + + { + /// + /// Specifies the text matching conditions based on casing. For more detail please refer to the Casing model. + /// + [global::ADT.PSArgumentCompleterAttribute("Insensitive", "Sensitive")] + string CaseSensitivity { get; set; } + /// + /// Specifies the text matching condition for text comparison. For more detail please refer to the MatchType model. + /// + [global::ADT.PSArgumentCompleterAttribute("Partial", "Complete")] + string MatchType { get; set; } + /// + /// The word or phrase to match against replicated content. A phrase with spaces will be considered a single substring. + /// + string Text { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.json.cs new file mode 100644 index 000000000000..3d04c0bab0ff --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatch.json.cs @@ -0,0 +1,113 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Configuration options for the text matching ruleset. For example, if the configuration is to deny "hello world" for partial + /// case-insensitive words then "chello worlds" would get detected and the resulting file would be denied. + /// + public partial class TextMatch + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.ITextMatch. + /// + /// a to deserialize from. + /// an instance of ADT.Models.ITextMatch. + public static ADT.Models.ITextMatch FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new TextMatch(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal TextMatch(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_text = If( json?.PropertyT("text"), out var __jsonText) ? (string)__jsonText : (string)_text;} + {_matchType = If( json?.PropertyT("matchType"), out var __jsonMatchType) ? (string)__jsonMatchType : (string)_matchType;} + {_caseSensitivity = If( json?.PropertyT("caseSensitivity"), out var __jsonCaseSensitivity) ? (string)__jsonCaseSensitivity : (string)_caseSensitivity;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._text)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._text.ToString()) : null, "text" ,container.Add ); + AddIf( null != (((object)this._matchType)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._matchType.ToString()) : null, "matchType" ,container.Add ); + AddIf( null != (((object)this._caseSensitivity)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._caseSensitivity.ToString()) : null, "caseSensitivity" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.PowerShell.cs new file mode 100644 index 000000000000..2872efb762e3 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + /// + [System.ComponentModel.TypeConverter(typeof(TextMatchingRulesetTypeConverter))] + public partial class TextMatchingRuleset + { + + /// + /// 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 ADT.Models.ITextMatchingRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TextMatchingRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.ITextMatchingRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TextMatchingRuleset(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 ADT.Models.ITextMatchingRuleset FromJsonString(string jsonText) => FromJson(ADT.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TextMatchingRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Deny")) + { + ((ADT.Models.ITextMatchingRulesetInternal)this).Deny = (System.Collections.Generic.List) content.GetValueForProperty("Deny",((ADT.Models.ITextMatchingRulesetInternal)this).Deny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TextMatchingRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Deny")) + { + ((ADT.Models.ITextMatchingRulesetInternal)this).Deny = (System.Collections.Generic.List) content.GetValueForProperty("Deny",((ADT.Models.ITextMatchingRulesetInternal)this).Deny, __y => TypeConverterExtensions.SelectToList(__y, ADT.Models.TextMatchTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, ADT.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(); + } + } + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + [System.ComponentModel.TypeConverter(typeof(TextMatchingRulesetTypeConverter))] + public partial interface ITextMatchingRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.TypeConverter.cs new file mode 100644 index 000000000000..541125fdcea8 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TextMatchingRulesetTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.ITextMatchingRuleset ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.ITextMatchingRuleset).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TextMatchingRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TextMatchingRuleset.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TextMatchingRuleset.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.cs new file mode 100644 index 000000000000..51d6774ec4d5 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.cs @@ -0,0 +1,65 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + /// + public partial class TextMatchingRuleset : + ADT.Models.ITextMatchingRuleset, + ADT.Models.ITextMatchingRulesetInternal + { + + /// Backing field for property. + private System.Collections.Generic.List _deny; + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public System.Collections.Generic.List Deny { get => this._deny; set => this._deny = value; } + + /// Creates an new instance. + public TextMatchingRuleset() + { + + } + } + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + public partial interface ITextMatchingRuleset : + ADT.Runtime.IJsonSerializable + { + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + System.Collections.Generic.List Deny { get; set; } + + } + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + internal partial interface ITextMatchingRulesetInternal + + { + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + System.Collections.Generic.List Deny { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.json.cs new file mode 100644 index 000000000000..fb86ca456622 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/TextMatchingRuleset.json.cs @@ -0,0 +1,117 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// + /// Rules for detecting and blocking specific text patterns. If a file contains a text pattern that is part of the configured + /// deny list, the file will be denied. + /// + public partial class TextMatchingRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.ITextMatchingRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.ITextMatchingRuleset. + public static ADT.Models.ITextMatchingRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new TextMatchingRuleset(json) : null; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal TextMatchingRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_deny = If( json?.PropertyT("deny"), out var __jsonDeny) ? If( __jsonDeny as ADT.Runtime.Json.JsonArray, out var __v) ? new global::System.Func>(()=> global::System.Linq.Enumerable.ToList(global::System.Linq.Enumerable.Select(__v, (__u)=>(ADT.Models.ITextMatch) (ADT.Models.TextMatch.FromJson(__u) )) ))() : null : _deny;} + 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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._deny) + { + var __w = new ADT.Runtime.Json.XNodeArray(); + foreach( var __x in this._deny ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("deny",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.PowerShell.cs index 4c942774e39a..24838532ecb5 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.PowerShell.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.PowerShell.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using ADT.Runtime.PowerShell; - /// Result of the schema validation. + /// + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. + /// [System.ComponentModel.TypeConverter(typeof(ValidateSchemaResultTypeConverter))] public partial class ValidateSchemaResult { @@ -158,7 +161,8 @@ internal ValidateSchemaResult(global::System.Management.Automation.PSObject cont AfterDeserializePSObject(content); } } - /// Result of the schema validation. + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. [System.ComponentModel.TypeConverter(typeof(ValidateSchemaResultTypeConverter))] public partial interface IValidateSchemaResult diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.cs index a6abfe0a37fe..b6119a71b634 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// Result of the schema validation. + /// + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. + /// public partial class ValidateSchemaResult : ADT.Models.IValidateSchemaResult, ADT.Models.IValidateSchemaResultInternal @@ -36,7 +39,8 @@ public ValidateSchemaResult() } } - /// Result of the schema validation. + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. public partial interface IValidateSchemaResult : ADT.Runtime.IJsonSerializable { @@ -65,7 +69,8 @@ public partial interface IValidateSchemaResult : string Status { get; } } - /// Result of the schema validation. + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. internal partial interface IValidateSchemaResultInternal { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.json.cs index 4a014e6122b5..47468cf96775 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.json.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/ValidateSchemaResult.json.cs @@ -7,7 +7,10 @@ namespace ADT.Models { using static ADT.Runtime.Extensions; - /// Result of the schema validation. + /// + /// Result of the schema validation. ValidateSchemaResult has reached end of life support starting version 2025-05-30-preview. + /// Please manage schemas with a FlowProfile resource instead. + /// public partial class ValidateSchemaResult { diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.PowerShell.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.PowerShell.cs new file mode 100644 index 000000000000..a68182590116 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.PowerShell.cs @@ -0,0 +1,176 @@ +// 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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// Rules for filtering XML content using XSD schemas. + [System.ComponentModel.TypeConverter(typeof(XmlFilterRulesetTypeConverter))] + public partial class XmlFilterRuleset + { + + /// + /// 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 ADT.Models.IXmlFilterRuleset DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new XmlFilterRuleset(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// an instance of . + public static ADT.Models.IXmlFilterRuleset DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new XmlFilterRuleset(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 ADT.Models.IXmlFilterRuleset FromJsonString(string jsonText) => FromJson(ADT.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, ADT.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 XmlFilterRuleset(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultNamespace")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).DefaultNamespace = (string) content.GetValueForProperty("DefaultNamespace",((ADT.Models.IXmlFilterRulesetInternal)this).DefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("Reference")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).Reference = (string) content.GetValueForProperty("Reference",((ADT.Models.IXmlFilterRulesetInternal)this).Reference, global::System.Convert.ToString); + } + if (content.Contains("Schema")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).Schema = (string) content.GetValueForProperty("Schema",((ADT.Models.IXmlFilterRulesetInternal)this).Schema, 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 XmlFilterRuleset(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DefaultNamespace")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).DefaultNamespace = (string) content.GetValueForProperty("DefaultNamespace",((ADT.Models.IXmlFilterRulesetInternal)this).DefaultNamespace, global::System.Convert.ToString); + } + if (content.Contains("Reference")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).Reference = (string) content.GetValueForProperty("Reference",((ADT.Models.IXmlFilterRulesetInternal)this).Reference, global::System.Convert.ToString); + } + if (content.Contains("Schema")) + { + ((ADT.Models.IXmlFilterRulesetInternal)this).Schema = (string) content.GetValueForProperty("Schema",((ADT.Models.IXmlFilterRulesetInternal)this).Schema, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// Rules for filtering XML content using XSD schemas. + [System.ComponentModel.TypeConverter(typeof(XmlFilterRulesetTypeConverter))] + public partial interface IXmlFilterRuleset + + { + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.TypeConverter.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.TypeConverter.cs new file mode 100644 index 000000000000..8a27b9436eea --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.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 ADT.Models +{ + using ADT.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class XmlFilterRulesetTypeConverter : 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("}") && ADT.Runtime.Json.JsonNode.Parse(text).Type == ADT.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 ADT.Models.IXmlFilterRuleset ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(ADT.Models.IXmlFilterRuleset).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return XmlFilterRuleset.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return XmlFilterRuleset.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return XmlFilterRuleset.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/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.cs new file mode 100644 index 000000000000..7b452e7441f6 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.cs @@ -0,0 +1,96 @@ +// 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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Rules for filtering XML content using XSD schemas. + public partial class XmlFilterRuleset : + ADT.Models.IXmlFilterRuleset, + ADT.Models.IXmlFilterRulesetInternal + { + + /// Backing field for property. + private string _defaultNamespace; + + /// The default XML namespace used for schema validation. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string DefaultNamespace { get => this._defaultNamespace; set => this._defaultNamespace = value; } + + /// Backing field for property. + private string _reference; + + /// Defines the method for referencing the xml schema. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Reference { get => this._reference; set => this._reference = value; } + + /// Backing field for property. + private string _schema; + + /// The inline XSD schema to be used for validation. + [ADT.Origin(ADT.PropertyOrigin.Owned)] + public string Schema { get => this._schema; set => this._schema = value; } + + /// Creates an new instance. + public XmlFilterRuleset() + { + + } + } + /// Rules for filtering XML content using XSD schemas. + public partial interface IXmlFilterRuleset : + ADT.Runtime.IJsonSerializable + { + /// The default XML namespace used for schema validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + string DefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string Reference { get; set; } + /// The inline XSD schema to be used for validation. + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + string Schema { get; set; } + + } + /// Rules for filtering XML content using XSD schemas. + internal partial interface IXmlFilterRulesetInternal + + { + /// The default XML namespace used for schema validation. + string DefaultNamespace { get; set; } + /// Defines the method for referencing the xml schema. + [global::ADT.PSArgumentCompleterAttribute("Inline")] + string Reference { get; set; } + /// The inline XSD schema to be used for validation. + string Schema { get; set; } + + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.json.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.json.cs new file mode 100644 index 000000000000..cf628b736021 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/api/Models/XmlFilterRuleset.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 ADT.Models +{ + using static ADT.Runtime.Extensions; + + /// Rules for filtering XML content using XSD schemas. + public partial class XmlFilterRuleset + { + + /// + /// 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(ADT.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 ADT.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(ADT.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 ADT.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of ADT.Models.IXmlFilterRuleset. + /// + /// a to deserialize from. + /// an instance of ADT.Models.IXmlFilterRuleset. + public static ADT.Models.IXmlFilterRuleset FromJson(ADT.Runtime.Json.JsonNode node) + { + return node is ADT.Runtime.Json.JsonObject json ? new XmlFilterRuleset(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 ADT.Runtime.Json.JsonNode ToJson(ADT.Runtime.Json.JsonObject container, ADT.Runtime.SerializationMode serializationMode) + { + container = container ?? new ADT.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._defaultNamespace)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._defaultNamespace.ToString()) : null, "defaultNamespace" ,container.Add ); + AddIf( null != (((object)this._reference)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._reference.ToString()) : null, "reference" ,container.Add ); + AddIf( null != (((object)this._schema)?.ToString()) ? (ADT.Runtime.Json.JsonNode) new ADT.Runtime.Json.JsonString(this._schema.ToString()) : null, "schema" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a ADT.Runtime.Json.JsonObject into a new instance of . + /// + /// A ADT.Runtime.Json.JsonObject instance to deserialize from. + internal XmlFilterRuleset(ADT.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defaultNamespace = If( json?.PropertyT("defaultNamespace"), out var __jsonDefaultNamespace) ? (string)__jsonDefaultNamespace : (string)_defaultNamespace;} + {_reference = If( json?.PropertyT("reference"), out var __jsonReference) ? (string)__jsonReference : (string)_reference;} + {_schema = If( json?.PropertyT("schema"), out var __jsonSchema) ? (string)__jsonSchema : (string)_schema;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_Approve.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_Approve.cs index 9a2d38fe4a2a..75d4abde06ce 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_Approve.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_Approve.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_Approve", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] public partial class ApproveAzDataTransferConnection_Approve : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -122,12 +122,12 @@ public partial class ApproveAzDataTransferConnection_Approve : global::System.Ma /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveExpanded.cs index 1c38bc4095cf..61767229d2c3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveExpanded.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_ApproveExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] public partial class ApproveAzDataTransferConnection_ApproveExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -122,12 +122,12 @@ public partial class ApproveAzDataTransferConnection_ApproveExpanded : global::S /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentity.cs index be08589f6e21..9a30f512ad20 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentity.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_ApproveViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] public partial class ApproveAzDataTransferConnection_ApproveViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentityExpanded.cs index 3a4c7756d042..9af08d32503b 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_ApproveViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] public partial class ApproveAzDataTransferConnection_ApproveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonFilePath.cs index e9efe507914c..08812ad9305c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonFilePath.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_ApproveViaJsonFilePath", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class ApproveAzDataTransferConnection_ApproveViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -124,12 +124,12 @@ public partial class ApproveAzDataTransferConnection_ApproveViaJsonFilePath : gl /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonString.cs index a69bd02f8cbd..861e91f88506 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/ApproveAzDataTransferConnection_ApproveViaJsonString.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Approves the specified connection request in a pipeline. + /// Approves a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] ApproveConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Approve, @"AzDataTransferConnection_ApproveViaJsonString", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Approves the specified connection request in a pipeline.")] + [global::ADT.Description(@"Approves a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/approveConnection", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class ApproveAzDataTransferConnection_ApproveViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -122,12 +122,12 @@ public partial class ApproveAzDataTransferConnection_ApproveViaJsonString : glob /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_Reject.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_Reject.cs index b27201ce4f96..eb8ff10d3b48 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_Reject.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_Reject.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_Reject", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] public partial class DenyAzDataTransferConnection_Reject : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -122,12 +122,12 @@ public partial class DenyAzDataTransferConnection_Reject : global::System.Manage /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectExpanded.cs index 82f701974e69..82bd7b85a6f0 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectExpanded.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_RejectExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] public partial class DenyAzDataTransferConnection_RejectExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -122,12 +122,12 @@ public partial class DenyAzDataTransferConnection_RejectExpanded : global::Syste /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentity.cs index fdb7742c07ae..191fba7d680f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentity.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_RejectViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] public partial class DenyAzDataTransferConnection_RejectViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentityExpanded.cs index 2966320bf09c..2c773ac5389a 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaIdentityExpanded.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_RejectViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] public partial class DenyAzDataTransferConnection_RejectViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonFilePath.cs index 0e13d809e425..67cf4c73eb96 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonFilePath.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_RejectViaJsonFilePath", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class DenyAzDataTransferConnection_RejectViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -124,12 +124,12 @@ public partial class DenyAzDataTransferConnection_RejectViaJsonFilePath : global /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonString.cs index 1c625817b49c..d9d62a898bc3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DenyAzDataTransferConnection_RejectViaJsonString.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Rejects the specified connection request in a pipeline. + /// Rejects a pending connection request associated with the specified Pipeline. /// /// [OpenAPI] RejectConnection=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Deny, @"AzDataTransferConnection_RejectViaJsonString", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] - [global::ADT.Description(@"Rejects the specified connection request in a pipeline.")] + [global::ADT.Description(@"Rejects a pending connection request associated with the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/rejectConnection", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class DenyAzDataTransferConnection_RejectViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -122,12 +122,12 @@ public partial class DenyAzDataTransferConnection_RejectViaJsonString : global:: /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_Disable.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_Disable.cs index 2cc3f433b9a2..2cebab1a897d 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_Disable.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_Disable.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Disables the specified flow")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-30-preview")] public partial class DisableAzDataTransferFlow_Disable : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentity.cs index 67f5e7370114..3ca06993ca82 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Disables the specified flow")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-30-preview")] public partial class DisableAzDataTransferFlow_DisableViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentityConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentityConnection.cs index 1696b6a73a97..217a49244488 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentityConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/DisableAzDataTransferFlow_DisableViaIdentityConnection.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Disables the specified flow")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/disable", ApiVersion = "2025-05-30-preview")] public partial class DisableAzDataTransferFlow_DisableViaIdentityConnection : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_Enable.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_Enable.cs index db4f98ee79e2..6909edbba4dc 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_Enable.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_Enable.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Enables the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-30-preview")] public partial class EnableAzDataTransferFlow_Enable : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentity.cs index 57dbd63a99fe..5b96287f7e94 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Enables the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-30-preview")] public partial class EnableAzDataTransferFlow_EnableViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentityConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentityConnection.cs index 71f400b598cb..fe782d262794 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentityConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/EnableAzDataTransferFlow_EnableViaIdentityConnection.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Enables the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/enable", ApiVersion = "2025-05-30-preview")] public partial class EnableAzDataTransferFlow_EnableViaIdentityConnection : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_Get.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_Get.cs index d4e9adf4e57c..e6d3b7d6d734 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_Get.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_Get.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Gets connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferConnection_Get : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_GetViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_GetViaIdentity.cs index b1f491b53dff..ab2765015af1 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_GetViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Gets connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferConnection_GetViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List.cs index a00820eb7797..08e30468fbd3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Gets connections in a subscription.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/connections", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferConnection_List : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List1.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List1.cs index d4a8166b635b..71af9365508f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List1.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferConnection_List1.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Gets connections in a resource group.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferConnection_List1 : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_Get.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_Get.cs new file mode 100644 index 000000000000..9bf18e69528a --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_Get.cs @@ -0,0 +1,525 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves the specified FlowProfile resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_Get")] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Retrieves the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_Get : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesGet(SubscriptionId, ResourceGroupName, PipelineName, Name, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentity.cs new file mode 100644 index 000000000000..c272be3aa70c --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentity.cs @@ -0,0 +1,489 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves the specified FlowProfile resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Retrieves the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FlowProfilesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FlowProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FlowProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FlowProfilesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PipelineName ?? null, InputObject.FlowProfileName ?? null, onOk, onDefault, this, Pipeline); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentityPipeline.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentityPipeline.cs new file mode 100644 index 000000000000..0cd04bce5bd4 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_GetViaIdentityPipeline.cs @@ -0,0 +1,504 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves the specified FlowProfile resource. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_GetViaIdentityPipeline")] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Retrieves the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_GetViaIdentityPipeline : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _pipelineInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity PipelineInputObject { get => this._pipelineInputObject; set => this._pipelineInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_GetViaIdentityPipeline() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PipelineInputObject?.Id != null) + { + this.PipelineInputObject.Id += $"/flowProfiles/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FlowProfilesGetViaIdentity(PipelineInputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PipelineInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + await this.Client.FlowProfilesGet(PipelineInputObject.SubscriptionId ?? null, PipelineInputObject.ResourceGroupName ?? null, PipelineInputObject.PipelineName ?? null, Name, onOk, onDefault, this, Pipeline); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + if (null != result) + { + if (0 == _responseSize) + { + _firstResponse = result; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(result.AddMultipleTypeNameIntoPSObject()); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List.cs new file mode 100644 index 000000000000..d7f000c7eeeb --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List.cs @@ -0,0 +1,483 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// + /// [OpenAPI] ListFlowProfiles=>POST:"/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfileMetadata))] + [global::ADT.Description(@"Retrieves a list of FlowProfile resources associated with a specified pipeline.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/providers/Microsoft.AzureDataTransfer/listFlowProfiles", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_List : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Backing field for property. + private ADT.Models.IListFlowProfilesRequest _body; + + /// + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Defines the required request body for retrieving FlowProfile information for a provided pipeline.", ValueFromPipeline = true)] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Defines the required request body for retrieving FlowProfile information for a provided pipeline.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(ADT.Models.IListFlowProfilesRequest) })] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + public ADT.Models.IListFlowProfilesRequest Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureDataTransferListFlowProfiles' operation")) + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureDataTransferListFlowProfiles(Body, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be System.Collections.Generic.List + var result = (await response); + // response should be returning an array of some kind. +Pageable + // array / / + if (null != result) + { + if (0 == _responseSize && 1 == result.Count) + { + _firstResponse = result[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List1.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List1.cs new file mode 100644 index 000000000000..90a509a7711b --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_List1.cs @@ -0,0 +1,534 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Lists all FlowProfiles under a given Pipeline. + /// + /// [OpenAPI] ListByPipeline=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_List1")] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Lists all FlowProfiles under a given Pipeline.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_List1 : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfileListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesListByPipeline(SubscriptionId, ResourceGroupName, PipelineName, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfileListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfileListResult + var result = (await response); + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + if (null != result.Value) + { + if (0 == _responseSize && 1 == result.Value.Count) + { + _firstResponse = result.Value[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result.Value ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (!String.IsNullOrEmpty(_nextLink)) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),ADT.Runtime.Method.Get ); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.FollowingNextLink); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesListByPipeline_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListExpanded.cs new file mode 100644 index 000000000000..2a383553bcda --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListExpanded.cs @@ -0,0 +1,483 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// + /// [OpenAPI] ListFlowProfiles=>POST:"/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_ListExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfileMetadata))] + [global::ADT.Description(@"Retrieves a list of FlowProfile resources associated with a specified pipeline.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/providers/Microsoft.AzureDataTransfer/listFlowProfiles", ApiVersion = "2025-05-30-preview")] + public partial class GetAzDataTransferFlowProfile_ListExpanded : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// Defines the required request body for retrieving FlowProfile information for a provided pipeline. + /// + private ADT.Models.IListFlowProfilesRequest _body = new ADT.Models.ListFlowProfilesRequest(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The name of the pipeline for which to retrieve associated FlowProfiles. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the pipeline for which to retrieve associated FlowProfiles.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the pipeline for which to retrieve associated FlowProfiles.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + public string PipelineName { get => _body.Pipeline ?? null; set => _body.Pipeline = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_ListExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureDataTransferListFlowProfiles' operation")) + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureDataTransferListFlowProfiles(_body, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be System.Collections.Generic.List + var result = (await response); + // response should be returning an array of some kind. +Pageable + // array / / + if (null != result) + { + if (0 == _responseSize && 1 == result.Count) + { + _firstResponse = result[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonFilePath.cs new file mode 100644 index 000000000000..9d6641784a77 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonFilePath.cs @@ -0,0 +1,483 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// + /// [OpenAPI] ListFlowProfiles=>POST:"/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_ListViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfileMetadata))] + [global::ADT.Description(@"Retrieves a list of FlowProfile resources associated with a specified pipeline.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/providers/Microsoft.AzureDataTransfer/listFlowProfiles", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class GetAzDataTransferFlowProfile_ListViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + public global::System.String _jsonString; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the List operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the List operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the List operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_ListViaJsonFilePath() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureDataTransferListFlowProfiles' operation")) + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureDataTransferListFlowProfilesViaJsonString(_jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be System.Collections.Generic.List + var result = (await response); + // response should be returning an array of some kind. +Pageable + // array / / + if (null != result) + { + if (0 == _responseSize && 1 == result.Count) + { + _firstResponse = result[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonString.cs new file mode 100644 index 000000000000..ea273963217d --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlowProfile_ListViaJsonString.cs @@ -0,0 +1,481 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Retrieves a list of FlowProfile resources associated with a specified pipeline. + /// + /// [OpenAPI] ListFlowProfiles=>POST:"/providers/Microsoft.AzureDataTransfer/listFlowProfiles" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferFlowProfile_ListViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfileMetadata))] + [global::ADT.Description(@"Retrieves a list of FlowProfile resources associated with a specified pipeline.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/providers/Microsoft.AzureDataTransfer/listFlowProfiles", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class GetAzDataTransferFlowProfile_ListViaJsonString : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// A buffer to record first returned object in response. + private object _firstResponse = null; + + /// + /// A flag to tell whether it is the first returned object in a call. Zero means no response yet. One means 1 returned object. + /// Two means multiple returned objects in response. + /// + private int _responseSize = 0; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the List operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the List operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the List operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse); + } + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public GetAzDataTransferFlowProfile_ListViaJsonString() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AzureDataTransferListFlowProfiles' operation")) + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AzureDataTransferListFlowProfilesViaJsonString(_jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a System.Collections.Generic.List + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task> response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be System.Collections.Generic.List + var result = (await response); + // response should be returning an array of some kind. +Pageable + // array / / + if (null != result) + { + if (0 == _responseSize && 1 == result.Count) + { + _firstResponse = result[0]; + _responseSize = 1; + } + else + { + if (1 ==_responseSize) + { + // Flush buffer + WriteObject(_firstResponse.AddMultipleTypeNameIntoPSObject()); + } + var values = new System.Collections.Generic.List(); + foreach( var value in result ) + { + values.Add(value.AddMultipleTypeNameIntoPSObject()); + } + WriteObject(values, true); + _responseSize = 2; + } + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_Get.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_Get.cs index fcbb6f0b3630..a8c12a04d1f6 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_Get.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_Get.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Gets flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferFlow_Get : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentity.cs index 7f4472f064e9..25170bc01cc2 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Gets flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferFlow_GetViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentityConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentityConnection.cs index 10917b48b67f..6549412a7435 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentityConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_GetViaIdentityConnection.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Gets flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferFlow_GetViaIdentityConnection : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_List.cs index 01e010a41be6..9bdece95e411 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_List.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferFlow_List.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Gets flows in a connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferFlow_List : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingConnection_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingConnection_List.cs index dd99f6ea6ea9..d4c8e9973960 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingConnection_List.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingConnection_List.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPendingConnection))] [global::ADT.Description(@"Lists all pending remote connections that are linkable to this connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingConnections", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingConnections", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPendingConnection_List : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingFlow_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingFlow_List.cs index dbfcc5c4adfa..f96f9d792bfb 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingFlow_List.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPendingFlow_List.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPendingFlow))] [global::ADT.Description(@"Lists all remote flows that have not yet been linked to local flows")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingFlows", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/listPendingFlows", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPendingFlow_List : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_Get.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_Get.cs index 2374482c5baf..d87e707e8e46 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_Get.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_Get.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferPipeline_Get")] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Gets pipeline resource.")] + [global::ADT.Description(@"Retrieves the specified Pipeline resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPipeline_Get : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -99,12 +99,12 @@ public partial class GetAzDataTransferPipeline_Get : global::System.Management.A /// Backing field for property. private string _name; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::System.Management.Automation.Alias("PipelineName")] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_GetViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_GetViaIdentity.cs index 298c54213b3f..deefdde6d81a 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_GetViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_GetViaIdentity.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Gets pipeline resource. + /// Retrieves the specified Pipeline resource. /// /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferPipeline_GetViaIdentity")] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Gets pipeline resource.")] + [global::ADT.Description(@"Retrieves the specified Pipeline resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPipeline_GetViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List.cs index ed5e60d7a911..f59fb193f60f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Gets pipelines in a subscription. + /// Lists all Pipeline resources within the current subscription. /// /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/pipelines" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferPipeline_List")] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Gets pipelines in a subscription.")] + [global::ADT.Description(@"Lists all Pipeline resources within the current subscription.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/pipelines", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.AzureDataTransfer/pipelines", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPipeline_List : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List1.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List1.cs index cecc5283a8e7..a2b08b6deee4 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List1.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/GetAzDataTransferPipeline_List1.cs @@ -10,15 +10,15 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Gets pipelines in a resource group. + /// Lists all Pipeline resources within the specified resource group. /// /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzDataTransferPipeline_List1")] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Gets pipelines in a resource group.")] + [global::ADT.Description(@"Lists all Pipeline resources within the specified resource group.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines", ApiVersion = "2025-05-30-preview")] public partial class GetAzDataTransferPipeline_List1 : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_Execute.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_Execute.cs index 62abb73a50f2..f549357fb851 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_Execute.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_Execute.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_Execute", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferExecutePipelineAction_Execute : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -123,12 +123,12 @@ public partial class InvokeAzDataTransferExecutePipelineAction_Execute : global: /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded.cs index 2b4930a3d766..2cfc5570a3a9 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_ExecuteExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -135,12 +135,12 @@ public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteExpanded : /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentity.cs index 1a69feefb619..1dbeb0b224f6 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentity.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_ExecuteViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded.cs index d77d30006971..5d3bc159b693 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath.cs index b1cc9446533f..b06bb980b43d 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -125,12 +125,12 @@ public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonFil /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonString.cs index 168d7ee9995b..75b998e8eed8 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonString.cs @@ -10,16 +10,16 @@ namespace ADT.Cmdlets using ADT.Runtime.Cmdlets; using System; - /// Executes a privileged action for a pipeline. + /// Executes a privileged or administrative action on the specified Pipeline. /// /// [OpenAPI] ExecuteAction=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction" /// [global::ADT.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzDataTransferExecutePipelineAction_ExecuteViaJsonString", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(ADT.Models.IPipeline))] - [global::ADT.Description(@"Executes a privileged action for a pipeline.")] + [global::ADT.Description(@"Executes a privileged or administrative action on the specified Pipeline.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/executeAction", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, @@ -123,12 +123,12 @@ public partial class InvokeAzDataTransferExecutePipelineAction_ExecuteViaJsonStr /// Backing field for property. private string _pipelineName; - /// The name for the pipeline to perform the operation on. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name for the pipeline to perform the operation on.")] + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] [ADT.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The name for the pipeline to perform the operation on.", + Description = @"The name of the pipeline on which to operate.", SerializedName = @"pipelineName", PossibleTypes = new [] { typeof(string) })] [global::ADT.Category(global::ADT.ParameterCategory.Path)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_Link.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_Link.cs index d78b6ead3bd7..66ddfe900a02 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_Link.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_Link.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingConnection_Link : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkExpanded.cs index 0032ecdb0618..d1f27c030fbf 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingConnection_LinkExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentity.cs index c018e04876e1..7d343700be03 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingConnection_LinkViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentityExpanded.cs index 579042ec80ed..986deab91c31 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingConnection_LinkViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonFilePath.cs index d92dfc70d723..72e5af8f1a40 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferLinkPendingConnection_LinkViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonString.cs index 358fea81e267..cb93128ac803 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingConnection_LinkViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"Links the connection to its pending connection.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/link", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferLinkPendingConnection_LinkViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_Link.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_Link.cs index 254ddd72ccb9..0576187b342f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_Link.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_Link.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_Link : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkExpanded.cs index 1f6405eb8401..ca95138bd8e9 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_LinkExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentity.cs index aa7a815b3dd0..a22448d8ab38 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnection.cs index f9e51f066a28..9a224e1f6cec 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnection.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnection : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnectionExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnectionExpanded.cs index d717c09c88fe..58467bc1a3f6 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnectionExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnectionExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityConnectionExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityExpanded.cs index 74c4f353e707..74380160027f 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonFilePath.cs index 5a456549cf0c..fce7dc4e58ae 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonString.cs index 95b4d5ba58f8..497270667527 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/InvokeAzDataTransferLinkPendingFlow_LinkViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"Links the specified flow.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}/link", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class InvokeAzDataTransferLinkPendingFlow_LinkViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateExpanded.cs index 660d13e85dce..5b1351e7bb68 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"create the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class NewAzDataTransferConnection_CreateExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -43,6 +43,17 @@ public partial class NewAzDataTransferConnection_CreateExpanded : global::System /// A dictionary to carry over additional data for pipeline. private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + /// Hostname specific to API Flows + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Hostname specific to API Flows")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Hostname specific to API Flows", + SerializedName = @"apiHostname", + PossibleTypes = new [] { typeof(string) })] + public string ApiHostname { get => _connectionBody.ApiHostname ?? null; set => _connectionBody.ApiHostname = value; } + /// when specified, runs this cmdlet as a PowerShell job [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] @@ -84,14 +95,29 @@ public partial class NewAzDataTransferConnection_CreateExpanded : global::System /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - /// The flow types being requested for this connection + /// Provides a list of FlowProfiles . + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Provides a list of FlowProfiles .")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Provides a list of FlowProfiles .", + SerializedName = @"flowProfileList", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfileMetadata) })] + public ADT.Models.IFlowProfileMetadata[] FlowProfileList { get => _connectionBody.FlowProfileList?.ToArray() ?? null /* fixedArrayOf */; set => _connectionBody.FlowProfileList = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The flow types being requested for this connection. This FlowType property has reached end of life support starting version + /// 2025-05-30-preview. Please create a FlowProfile resource instead. + /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The flow types being requested for this connection")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The flow types being requested for this connection. This FlowType property has reached end of life support starting version 2025-05-30-preview. Please create a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The flow types being requested for this connection", + Description = @"The flow types being requested for this connection. This FlowType property has reached end of life support starting version 2025-05-30-preview. Please create a FlowProfile resource instead.", SerializedName = @"flowTypes", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -206,14 +232,17 @@ public partial class NewAzDataTransferConnection_CreateExpanded : global::System PossibleTypes = new [] { typeof(string) })] public string PipelineName { get => _connectionBody.Pipeline ?? null; set => _connectionBody.Pipeline = value; } - /// The policies for this connection + /// + /// The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The policies for this connection")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The policies for this connection", + Description = @"The policies for this connection. The policies property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] [global::ADT.DoNotExport] @@ -282,26 +311,32 @@ public partial class NewAzDataTransferConnection_CreateExpanded : global::System [global::ADT.Category(global::ADT.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } - /// The schemas for this connection + /// + /// The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The schemas for this connection")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The schemas for this connection", + Description = @"The schemas for this connection. The schemas property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemas", PossibleTypes = new [] { typeof(ADT.Models.ISchema) })] public ADT.Models.ISchema[] Schema { get => _connectionBody.Schema?.ToArray() ?? null /* fixedArrayOf */; set => _connectionBody.Schema = (value != null ? new System.Collections.Generic.List(value) : null); } - /// The schema URIs for this connection + /// + /// The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The schema URIs for this connection")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The schema URIs for this connection", + Description = @"The schema URIs for this connection. The schemaUris property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"schemaUris", PossibleTypes = new [] { typeof(string) })] public string[] SchemaUri { get => _connectionBody.SchemaUri?.ToArray() ?? null /* fixedArrayOf */; set => _connectionBody.SchemaUri = (value != null ? new System.Collections.Generic.List(value) : null); } diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonFilePath.cs index 37d013b0eb6f..b42db37852c4 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"create the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class NewAzDataTransferConnection_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonString.cs index b3c136e1e7aa..a3e0d69d2304 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferConnection_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"create the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class NewAzDataTransferConnection_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateExpanded.cs new file mode 100644 index 000000000000..238a1a63a0f4 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateExpanded.cs @@ -0,0 +1,851 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// create a new FlowProfile or create an existing one. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDataTransferFlowProfile_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"create a new FlowProfile or create an existing one.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class NewAzDataTransferFlowProfile_CreateExpanded : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// + /// Represents a FlowProfile Azure resource, which defines a data replication scenario with a specific data classification + /// and a set of configurable policy rules. + /// + private ADT.Models.IFlowProfile _resourceBody = new ADT.Models.FlowProfile(); + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The list of antiviruses to be used as a scanning solution for replicating data.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + public string[] AntivirusAvSolution { get => _resourceBody.AntivirusAvSolution?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.AntivirusAvSolution = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + public double ArchiveMaximumCompressionRatioLimit { get => _resourceBody.ArchiveMaximumCompressionRatioLimit ?? default(double); set => _resourceBody.ArchiveMaximumCompressionRatioLimit = value; } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumDepthLimit { get => _resourceBody.ArchiveMaximumDepthLimit ?? default(long); set => _resourceBody.ArchiveMaximumDepthLimit = value; } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumExpansionSizeLimit { get => _resourceBody.ArchiveMaximumExpansionSizeLimit ?? default(long); set => _resourceBody.ArchiveMaximumExpansionSizeLimit = value; } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMinimumSizeForExpansion { get => _resourceBody.ArchiveMinimumSizeForExpansion ?? default(long); set => _resourceBody.ArchiveMinimumSizeForExpansion = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMaximum { get => _resourceBody.DataSizeMaximum ?? default(long); set => _resourceBody.DataSizeMaximum = value; } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMinimum { get => _resourceBody.DataSizeMinimum ?? default(long); set => _resourceBody.DataSizeMinimum = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A user-defined description of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A user-defined description of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user-defined description of the FlowProfile.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _resourceBody.IdentityType ?? null; set => _resourceBody.IdentityType = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + public ADT.Models.IMimeTypeFilter[] MimeFilter { get => _resourceBody.MimeFilter?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.MimeFilter = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + public string MimeFilterType { get => _resourceBody.MimeFilterType ?? null; set => _resourceBody.MimeFilterType = value; } + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data replication scenario handled by this FlowProfile. Please not, that this value cannot be updated after creation.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + public string ReplicationScenario { get => _resourceBody.ReplicationScenario ?? null; set => _resourceBody.ReplicationScenario = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The operational status of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The operational status of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + public string Status { get => _resourceBody.Status ?? null; set => _resourceBody.Status = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(ADT.Models.ITrackedResourceTags) })] + public ADT.Models.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of text patterns to block, each with matching rules and case sensitivity options.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + public ADT.Models.ITextMatch[] TextMatchingDeny { get => _resourceBody.TextMatchingDeny?.ToArray() ?? null /* fixedArrayOf */; set => _resourceBody.TextMatchingDeny = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + public ADT.Models.IUserAssignedIdentities UserAssignedIdentity { get => _resourceBody.IdentityUserAssignedIdentity ?? null /* object */; set => _resourceBody.IdentityUserAssignedIdentity = value; } + + /// The default XML namespace used for schema validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default XML namespace used for schema validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterDefaultNamespace { get => _resourceBody.XmlFilterDefaultNamespace ?? null; set => _resourceBody.XmlFilterDefaultNamespace = value; } + + /// Defines the method for referencing the xml schema. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the method for referencing the xml schema.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + public string XmlFilterReference { get => _resourceBody.XmlFilterReference ?? null; set => _resourceBody.XmlFilterReference = value; } + + /// The inline XSD schema to be used for validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The inline XSD schema to be used for validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterSchema { get => _resourceBody.XmlFilterSchema ?? null; set => _resourceBody.XmlFilterSchema = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDataTransferFlowProfile_CreateExpanded + public ADT.Cmdlets.NewAzDataTransferFlowProfile_CreateExpanded Clone() + { + var clone = new NewAzDataTransferFlowProfile_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzDataTransferFlowProfile_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesCreateOrUpdate(SubscriptionId, ResourceGroupName, PipelineName, Name, _resourceBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeCreate); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonFilePath.cs new file mode 100644 index 000000000000..b2a6cddcd6f0 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonFilePath.cs @@ -0,0 +1,594 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// create a new FlowProfile or create an existing one. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDataTransferFlowProfile_CreateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"create a new FlowProfile or create an existing one.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class NewAzDataTransferFlowProfile_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + public global::System.String _jsonString; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Create operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Create operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDataTransferFlowProfile_CreateViaJsonFilePath + public ADT.Cmdlets.NewAzDataTransferFlowProfile_CreateViaJsonFilePath Clone() + { + var clone = new NewAzDataTransferFlowProfile_CreateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzDataTransferFlowProfile_CreateViaJsonFilePath() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, PipelineName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonString.cs new file mode 100644 index 000000000000..56d6ced27fe4 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlowProfile_CreateViaJsonString.cs @@ -0,0 +1,592 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// create a new FlowProfile or create an existing one. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzDataTransferFlowProfile_CreateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"create a new FlowProfile or create an existing one.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class NewAzDataTransferFlowProfile_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Create operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Create operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Create operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of NewAzDataTransferFlowProfile_CreateViaJsonString + public ADT.Cmdlets.NewAzDataTransferFlowProfile_CreateViaJsonString Clone() + { + var clone = new NewAzDataTransferFlowProfile_CreateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public NewAzDataTransferFlowProfile_CreateViaJsonString() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesCreateOrUpdateViaJsonString(SubscriptionId, ResourceGroupName, PipelineName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateExpanded.cs index fddf20cc0455..7626d8697cc3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"create the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext @@ -57,17 +57,35 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag [global::ADT.PSArgumentCompleterAttribute("SDK", "Endpoint")] public string ApiFlowOptionApiMode { get => _flowBody.ApiFlowOptionApiMode ?? null; set => _flowBody.ApiFlowOptionApiMode = value; } - /// Optional field to override the audience of the remote endpoint - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional field to override the audience of the remote endpoint")] + /// + /// Optional field to override the audience of the remote endpoint. The property has reached end of life support starting + /// version 2025-05-30-preview. Please create and use the authentication property instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Optional field to override the audience of the remote endpoint", + Description = @"Optional field to override the audience of the remote endpoint. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"audienceOverride", PossibleTypes = new [] { typeof(string) })] public string ApiFlowOptionAudienceOverride { get => _flowBody.ApiFlowOptionAudienceOverride ?? null; set => _flowBody.ApiFlowOptionAudienceOverride = value; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API + /// Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the Azure Data Transfer API Flow. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + public ADT.Models.IAuthentication[] ApiFlowOptionAuthentication { get => _flowBody.ApiFlowOptionAuthentication?.ToArray() ?? null /* fixedArrayOf */; set => _flowBody.ApiFlowOptionAuthentication = (value != null ? new System.Collections.Generic.List(value) : null); } + /// Unique CNAME to represent the Azure Data Transfer API Flow instance [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Unique CNAME to represent the Azure Data Transfer API Flow instance")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] @@ -79,47 +97,59 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag PossibleTypes = new [] { typeof(string) })] public string ApiFlowOptionCname { get => _flowBody.ApiFlowOptionCname ?? null; set => _flowBody.ApiFlowOptionCname = value; } - /// Flag for if Azure Data Transfer API Flow should extract the user token - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Flag for if Azure Data Transfer API Flow should extract the user token")] + /// + /// Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached + /// end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Flag for if Azure Data Transfer API Flow should extract the user token", + Description = @"Determines which identity to use for extracting the user token for Azure Data Transfer API Flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"identityTranslation", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("UserIdentity", "ServiceIdentity")] public string ApiFlowOptionIdentityTranslation { get => _flowBody.ApiFlowOptionIdentityTranslation ?? null; set => _flowBody.ApiFlowOptionIdentityTranslation = value; } - /// Remote stub app registration Client ID - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Remote stub app registration Client ID")] + /// + /// Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Remote stub app registration Client ID", + Description = @"Remote stub app registration Client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"remoteCallingModeClientId", PossibleTypes = new [] { typeof(string) })] public string ApiFlowOptionRemoteCallingModeClientId { get => _flowBody.ApiFlowOptionRemoteCallingModeClientId ?? null; set => _flowBody.ApiFlowOptionRemoteCallingModeClientId = value; } - /// Remote host to which communication needs to be made - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Remote host to which communication needs to be made")] + /// + /// Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the remoteEndpointSettings.endpoint property instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Remote host to which communication needs to be made", + Description = @"Remote host to which communication needs to be made. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the remoteEndpointSettings.endpoint property instead.", SerializedName = @"remoteEndpoint", PossibleTypes = new [] { typeof(string) })] public string ApiFlowOptionRemoteEndpoint { get => _flowBody.ApiFlowOptionRemoteEndpoint ?? null; set => _flowBody.ApiFlowOptionRemoteEndpoint = value; } - /// Sender's app user assigned Manage Identity client ID - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Sender's app user assigned Manage Identity client ID")] + /// + /// Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use the authentication property instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Sender's app user assigned Manage Identity client ID", + Description = @"Sender's app user assigned Manage Identity client ID. The property has reached end of life support starting version 2025-05-30-preview. Please create and use the authentication property instead.", SerializedName = @"senderClientId", PossibleTypes = new [] { typeof(string) })] public string ApiFlowOptionSenderClientId { get => _flowBody.ApiFlowOptionSenderClientId ?? null; set => _flowBody.ApiFlowOptionSenderClientId = value; } @@ -209,13 +239,16 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag PossibleTypes = new [] { typeof(string) })] public string CustomerManagedKeyVaultUri { get => _flowBody.CustomerManagedKeyVaultUri ?? null; set => _flowBody.CustomerManagedKeyVaultUri = value; } - /// Type of data to transfer via the flow. - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of data to transfer via the flow.")] + /// + /// Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. + /// Please create and use a FlowProfile resource instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Type of data to transfer via the flow.", + Description = @"Type of data to transfer via the flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"dataType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Blob", "Table")] @@ -269,13 +302,106 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag /// Accessor for extensibleParameters. public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } - /// The flow type for this flow - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The flow type for this flow")] + /// The Flow's data class. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Flow's data class.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Flow's data class.", + SerializedName = @"flowDataType", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("ServiceBus", "EventHub", "ApiEndpoint", "ApiSDK", "Video", "Blob", "Table")] + public string FlowDataType { get => _flowBody.FlowDataType ?? null; set => _flowBody.FlowDataType = value; } + + /// + /// A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets + /// applied. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The flow type for this flow", + Description = @"A description of the FlowProfile and its rulesets. The description should describe the flowprofile's purpose and rulesets applied.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string FlowProfileDescription { get => _flowBody.ProfileDescription ?? null; set => _flowBody.ProfileDescription = value; } + + /// + /// A guid represented as a string for the FlowProfile resource, assigned by the system. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A guid represented as a string for the FlowProfile resource, assigned by the system.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A guid represented as a string for the FlowProfile resource, assigned by the system.", + SerializedName = @"flowProfileId", + PossibleTypes = new [] { typeof(string) })] + public string FlowProfileId { get => _flowBody.ProfileId ?? null; set => _flowBody.ProfileId = value; } + + /// The name of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the FlowProfile.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string FlowProfileName { get => _flowBody.ProfileName ?? null; set => _flowBody.ProfileName = value; } + + /// + /// The name of the parent Pipeline Azure resource associated with this FlowProfile. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name of the parent Pipeline Azure resource associated with this FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the parent Pipeline Azure resource associated with this FlowProfile.", + SerializedName = @"pipeline", + PossibleTypes = new [] { typeof(string) })] + public string FlowProfilePipeline { get => _flowBody.ProfilePipeline ?? null; set => _flowBody.ProfilePipeline = value; } + + /// + /// The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. + /// See the FlowProfilePatchProperties to see updateable properties. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data replication scenario handled by this FlowProfile. Please note, that this value cannot be updated after creation. See the FlowProfilePatchProperties to see updateable properties.", + SerializedName = @"replicationScenario", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Messaging", "API", "Stream", "Files", "SoftwareArtifacts", "Complex")] + public string FlowProfileReplicationScenario { get => _flowBody.ProfileReplicationScenario ?? null; set => _flowBody.ProfileReplicationScenario = value; } + + /// The operational status of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The operational status of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + public string FlowProfileStatus { get => _flowBody.ProfileStatus ?? null; set => _flowBody.ProfileStatus = value; } + + /// + /// The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please + /// create and use a FlowProfile resource instead. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The flow type for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"flowType", PossibleTypes = new [] { typeof(string) })] [global::ADT.PSArgumentCompleterAttribute("Unknown", "Complex", "DevSecOps", "Messaging", "Mission", "MicrosoftInternal", "BasicFiles", "Data", "Standard", "StreamingVideo", "Opaque", "MissionOpaqueXML", "DiskImages", "API")] @@ -345,6 +471,21 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag [global::ADT.PSArgumentCompleterAttribute("BlobTransport", "Standard", "Premium")] public string MessagingOptionBillingTier { get => _flowBody.MessagingOptionBillingTier ?? null; set => _flowBody.MessagingOptionBillingTier = value; } + /// + /// Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over + /// consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Field indicating whether to enable guaranteed delivery on the flow or not. The default disabled option chooses speed over consistency. When enabled, messages are delivered with minimal delay, but delivery is not guaranteed under all conditions", + SerializedName = @"performancePriority", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Enabled", "Disabled")] + public string MessagingOptionPerformancePriority { get => _flowBody.MessagingOptionPerformancePriority ?? null; set => _flowBody.MessagingOptionPerformancePriority = value; } + /// /// cancellation delegate. Stops the cmdlet when called. /// @@ -452,14 +593,17 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag PossibleTypes = new [] { typeof(string) })] public string PlanVersion { get => _flowBody.PlanVersion ?? null; set => _flowBody.PlanVersion = value; } - /// The policies for this flow + /// + /// The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create + /// and use a FlowProfile resource instead. + /// [global::System.Management.Automation.AllowEmptyCollection] - [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The policies for this flow")] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.")] [global::ADT.Category(global::ADT.ParameterCategory.Body)] [ADT.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The policies for this flow", + Description = @"The policies for this flow. The property has reached end of life support starting version 2025-05-30-preview. Please create and use a FlowProfile resource instead.", SerializedName = @"policies", PossibleTypes = new [] { typeof(string) })] [global::ADT.DoNotExport] @@ -492,6 +636,32 @@ public partial class NewAzDataTransferFlow_CreateExpanded : global::System.Manag [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + /// + /// Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not + /// provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional and for advanced used only. A list of authentication methods to use when accessing the remote endpoint. If not provided, the default S2S authentication using Entra (API Flow Managed Identity) and RBAC will be applied.", + SerializedName = @"authentication", + PossibleTypes = new [] { typeof(ADT.Models.IAuthentication) })] + public ADT.Models.IAuthentication[] RemoteEndpointSettingAuthentication { get => _flowBody.RemoteEndpointSettingAuthentication?.ToArray() ?? null /* fixedArrayOf */; set => _flowBody.RemoteEndpointSettingAuthentication = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// The remote endpoint uri all API calls. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The remote endpoint uri all API calls.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The remote endpoint uri all API calls.", + SerializedName = @"endpoint", + PossibleTypes = new [] { typeof(string) })] + public string RemoteEndpointSettingEndpoint { get => _flowBody.RemoteEndpointSettingEndpoint ?? null; set => _flowBody.RemoteEndpointSettingEndpoint = value; } + /// Backing field for property. private string _resourceGroupName; diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonFilePath.cs index 54025442b931..3602b49da2a4 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"create the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class NewAzDataTransferFlow_CreateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonString.cs index 6cbcce92eb60..5196190a6a38 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/NewAzDataTransferFlow_CreateViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"create the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class NewAzDataTransferFlow_CreateViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_Delete.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_Delete.cs index 6eee94a88c9a..0425900830dd 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_Delete.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_Delete.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::ADT.Description(@"Deletes the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class RemoveAzDataTransferConnection_Delete : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_DeleteViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_DeleteViaIdentity.cs index d01ec94b33e6..d98666bd09d4 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_DeleteViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferConnection_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::ADT.Description(@"Deletes the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class RemoveAzDataTransferConnection_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_Delete.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_Delete.cs new file mode 100644 index 000000000000..f9ec5d2b03aa --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_Delete.cs @@ -0,0 +1,616 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Deletes the specified FlowProfile resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::ADT.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDataTransferFlowProfile_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::ADT.Description(@"Deletes the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class RemoveAzDataTransferFlowProfile_Delete : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDataTransferFlowProfile_Delete + public ADT.Cmdlets.RemoveAzDataTransferFlowProfile_Delete Clone() + { + var clone = new RemoveAzDataTransferFlowProfile_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesDelete(SubscriptionId, ResourceGroupName, PipelineName, Name, onNoContent, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzDataTransferFlowProfile_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentity.cs new file mode 100644 index 000000000000..52d887b56585 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentity.cs @@ -0,0 +1,579 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Deletes the specified FlowProfile resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::ADT.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDataTransferFlowProfile_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::ADT.Description(@"Deletes the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class RemoveAzDataTransferFlowProfile_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of RemoveAzDataTransferFlowProfile_DeleteViaIdentity + public ADT.Cmdlets.RemoveAzDataTransferFlowProfile_DeleteViaIdentity Clone() + { + var clone = new RemoveAzDataTransferFlowProfile_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FlowProfilesDeleteViaIdentity(InputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FlowProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FlowProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FlowProfilesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PipelineName ?? null, InputObject.FlowProfileName ?? null, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzDataTransferFlowProfile_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline.cs new file mode 100644 index 000000000000..1bd79618c621 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline.cs @@ -0,0 +1,597 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Deletes the specified FlowProfile resource. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::ADT.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzDataTransferFlowProfile_DeleteViaIdentityPipeline", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::ADT.Description(@"Deletes the specified FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _pipelineInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity PipelineInputObject { get => this._pipelineInputObject; set => this._pipelineInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline + /// + public ADT.Cmdlets.RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline Clone() + { + var clone = new RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PipelineInputObject?.Id != null) + { + this.PipelineInputObject.Id += $"/flowProfiles/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FlowProfilesDeleteViaIdentity(PipelineInputObject.Id, onNoContent, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PipelineInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + await this.Client.FlowProfilesDelete(PipelineInputObject.SubscriptionId ?? null, PipelineInputObject.ResourceGroupName ?? null, PipelineInputObject.PipelineName ?? null, Name, onNoContent, onOk, onDefault, this, Pipeline); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public RemoveAzDataTransferFlowProfile_DeleteViaIdentityPipeline() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / + if (true == InvocationInformation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_Delete.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_Delete.cs index 65b412afecd6..50b0dbf4205c 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_Delete.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_Delete.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::ADT.Description(@"Deletes the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class RemoveAzDataTransferFlow_Delete : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentity.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentity.cs index f6601869d92b..d2190845d927 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentity.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentity.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::ADT.Description(@"Deletes the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class RemoveAzDataTransferFlow_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentityConnection.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentityConnection.cs index 7efd3f581e71..a7a41be8c067 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentityConnection.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/RemoveAzDataTransferFlow_DeleteViaIdentityConnection.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(bool))] [global::ADT.Description(@"Deletes the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class RemoveAzDataTransferFlow_DeleteViaIdentityConnection : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateExpanded.cs index 329e1829fd97..1e690a7866ae 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"update the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class UpdateAzDataTransferConnection_UpdateExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaIdentityExpanded.cs index 49e14c7b02cb..bdfbb494bc07 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"update the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] public partial class UpdateAzDataTransferConnection_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonFilePath.cs index c6aa9573009c..0a935a874fb3 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"update the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class UpdateAzDataTransferConnection_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonString.cs index 67eb292edad2..a2c39a16e975 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferConnection_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IConnection))] [global::ADT.Description(@"update the connection resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class UpdateAzDataTransferConnection_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateExpanded.cs new file mode 100644 index 000000000000..b0a0c2eeeb43 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateExpanded.cs @@ -0,0 +1,823 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Applies partial update to an existing FlowProfile resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDataTransferFlowProfile_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Applies partial update to an existing FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class UpdateAzDataTransferFlowProfile_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines the patchable properties for a FlowProfile resource. + private ADT.Models.IFlowProfilePatch _propertiesBody = new ADT.Models.FlowProfilePatch(); + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The list of antiviruses to be used as a scanning solution for replicating data.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + public string[] AntivirusAvSolution { get => _propertiesBody.AntivirusAvSolution?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.AntivirusAvSolution = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + public double ArchiveMaximumCompressionRatioLimit { get => _propertiesBody.ArchiveMaximumCompressionRatioLimit ?? default(double); set => _propertiesBody.ArchiveMaximumCompressionRatioLimit = value; } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumDepthLimit { get => _propertiesBody.ArchiveMaximumDepthLimit ?? default(long); set => _propertiesBody.ArchiveMaximumDepthLimit = value; } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumExpansionSizeLimit { get => _propertiesBody.ArchiveMaximumExpansionSizeLimit ?? default(long); set => _propertiesBody.ArchiveMaximumExpansionSizeLimit = value; } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMinimumSizeForExpansion { get => _propertiesBody.ArchiveMinimumSizeForExpansion ?? default(long); set => _propertiesBody.ArchiveMinimumSizeForExpansion = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMaximum { get => _propertiesBody.DataSizeMaximum ?? default(long); set => _propertiesBody.DataSizeMaximum = value; } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMinimum { get => _propertiesBody.DataSizeMinimum ?? default(long); set => _propertiesBody.DataSizeMinimum = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description of the FlowProfile that defines the replication scenario. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description of the FlowProfile that defines the replication scenario.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description of the FlowProfile that defines the replication scenario.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _propertiesBody.IdentityType ?? null; set => _propertiesBody.IdentityType = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + public ADT.Models.IMimeTypeFilter[] MimeFilter { get => _propertiesBody.MimeFilter?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MimeFilter = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + public string MimeFilterType { get => _propertiesBody.MimeFilterType ?? null; set => _propertiesBody.MimeFilterType = value; } + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The operational status of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The operational status of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfilePatchTags) })] + public ADT.Models.IFlowProfilePatchTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of text patterns to block, each with matching rules and case sensitivity options.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + public ADT.Models.ITextMatch[] TextMatchingDeny { get => _propertiesBody.TextMatchingDeny?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.TextMatchingDeny = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + public ADT.Models.IUserAssignedIdentities UserAssignedIdentity { get => _propertiesBody.IdentityUserAssignedIdentity ?? null /* object */; set => _propertiesBody.IdentityUserAssignedIdentity = value; } + + /// The default XML namespace used for schema validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default XML namespace used for schema validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterDefaultNamespace { get => _propertiesBody.XmlFilterDefaultNamespace ?? null; set => _propertiesBody.XmlFilterDefaultNamespace = value; } + + /// Defines the method for referencing the xml schema. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the method for referencing the xml schema.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + public string XmlFilterReference { get => _propertiesBody.XmlFilterReference ?? null; set => _propertiesBody.XmlFilterReference = value; } + + /// The inline XSD schema to be used for validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The inline XSD schema to be used for validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterSchema { get => _propertiesBody.XmlFilterSchema ?? null; set => _propertiesBody.XmlFilterSchema = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzDataTransferFlowProfile_UpdateExpanded + public ADT.Cmdlets.UpdateAzDataTransferFlowProfile_UpdateExpanded Clone() + { + var clone = new UpdateAzDataTransferFlowProfile_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesUpdate(SubscriptionId, ResourceGroupName, PipelineName, Name, _propertiesBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeUpdate); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzDataTransferFlowProfile_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..dec5994702b9 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded.cs @@ -0,0 +1,788 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Applies partial update to an existing FlowProfile resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDataTransferFlowProfile_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Applies partial update to an existing FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines the patchable properties for a FlowProfile resource. + private ADT.Models.IFlowProfilePatch _propertiesBody = new ADT.Models.FlowProfilePatch(); + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The list of antiviruses to be used as a scanning solution for replicating data.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + public string[] AntivirusAvSolution { get => _propertiesBody.AntivirusAvSolution?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.AntivirusAvSolution = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + public double ArchiveMaximumCompressionRatioLimit { get => _propertiesBody.ArchiveMaximumCompressionRatioLimit ?? default(double); set => _propertiesBody.ArchiveMaximumCompressionRatioLimit = value; } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumDepthLimit { get => _propertiesBody.ArchiveMaximumDepthLimit ?? default(long); set => _propertiesBody.ArchiveMaximumDepthLimit = value; } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumExpansionSizeLimit { get => _propertiesBody.ArchiveMaximumExpansionSizeLimit ?? default(long); set => _propertiesBody.ArchiveMaximumExpansionSizeLimit = value; } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMinimumSizeForExpansion { get => _propertiesBody.ArchiveMinimumSizeForExpansion ?? default(long); set => _propertiesBody.ArchiveMinimumSizeForExpansion = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMaximum { get => _propertiesBody.DataSizeMaximum ?? default(long); set => _propertiesBody.DataSizeMaximum = value; } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMinimum { get => _propertiesBody.DataSizeMinimum ?? default(long); set => _propertiesBody.DataSizeMinimum = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description of the FlowProfile that defines the replication scenario. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description of the FlowProfile that defines the replication scenario.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description of the FlowProfile that defines the replication scenario.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _propertiesBody.IdentityType ?? null; set => _propertiesBody.IdentityType = value; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + public ADT.Models.IMimeTypeFilter[] MimeFilter { get => _propertiesBody.MimeFilter?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MimeFilter = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + public string MimeFilterType { get => _propertiesBody.MimeFilterType ?? null; set => _propertiesBody.MimeFilterType = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The operational status of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The operational status of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } + + /// Resource tags. + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfilePatchTags) })] + public ADT.Models.IFlowProfilePatchTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of text patterns to block, each with matching rules and case sensitivity options.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + public ADT.Models.ITextMatch[] TextMatchingDeny { get => _propertiesBody.TextMatchingDeny?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.TextMatchingDeny = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + public ADT.Models.IUserAssignedIdentities UserAssignedIdentity { get => _propertiesBody.IdentityUserAssignedIdentity ?? null /* object */; set => _propertiesBody.IdentityUserAssignedIdentity = value; } + + /// The default XML namespace used for schema validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default XML namespace used for schema validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterDefaultNamespace { get => _propertiesBody.XmlFilterDefaultNamespace ?? null; set => _propertiesBody.XmlFilterDefaultNamespace = value; } + + /// Defines the method for referencing the xml schema. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the method for referencing the xml schema.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + public string XmlFilterReference { get => _propertiesBody.XmlFilterReference ?? null; set => _propertiesBody.XmlFilterReference = value; } + + /// The inline XSD schema to be used for validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The inline XSD schema to be used for validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterSchema { get => _propertiesBody.XmlFilterSchema ?? null; set => _propertiesBody.XmlFilterSchema = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded + /// + public ADT.Cmdlets.UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FlowProfilesUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FlowProfileName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FlowProfileName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FlowProfilesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.PipelineName ?? null, InputObject.FlowProfileName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeUpdate); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzDataTransferFlowProfile_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded.cs new file mode 100644 index 000000000000..b0e33def9e93 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded.cs @@ -0,0 +1,805 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Applies partial update to an existing FlowProfile resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Applies partial update to an existing FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + public partial class UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// Defines the patchable properties for a FlowProfile resource. + private ADT.Models.IFlowProfilePatch _propertiesBody = new ADT.Models.FlowProfilePatch(); + + /// + /// Optional. The list of antiviruses to be used as a scanning solution for replicating data. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The list of antiviruses to be used as a scanning solution for replicating data.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The list of antiviruses to be used as a scanning solution for replicating data.", + SerializedName = @"avSolutions", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Defender", "ClamAv")] + public string[] AntivirusAvSolution { get => _propertiesBody.AntivirusAvSolution?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.AntivirusAvSolution = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This + /// value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the + /// archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Provides the multiplication value for an archive in total based on the initial object being validated. This value takes the root object size and multiplies it by this value to create a maximum. Once this maximum is exceeded, the archive is failed. Used to detect and block archives with suspiciously high compression (e.g., zip bombs).", + SerializedName = @"maximumCompressionRatioLimit", + PossibleTypes = new [] { typeof(double) })] + public double ArchiveMaximumCompressionRatioLimit { get => _propertiesBody.ArchiveMaximumCompressionRatioLimit ?? default(double); set => _propertiesBody.ArchiveMaximumCompressionRatioLimit = value; } + + /// + /// Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will + /// be processed. Archives exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The maximum depth of nested archives that can be expanded. Limits how many layers of embedded archives will be processed. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumDepthLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumDepthLimit { get => _propertiesBody.ArchiveMaximumDepthLimit ?? default(long); set => _propertiesBody.ArchiveMaximumDepthLimit = value; } + + /// + /// Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives + /// exceeding the max limit will be denied for replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. The combined maximum size (in bytes) of all extracted files that an expanded archive is allowed to reach. Archives exceeding the max limit will be denied for replication.", + SerializedName = @"maximumExpansionSizeLimit", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMaximumExpansionSizeLimit { get => _propertiesBody.ArchiveMaximumExpansionSizeLimit ?? default(long); set => _propertiesBody.ArchiveMaximumExpansionSizeLimit = value; } + + /// + /// Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any + /// archive file size below the configured threshold will skip the rest of the configured rulesets for archives. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. The minimum archive file size (in bytes) required to trigger expansion during replication. Any archive file size below the configured threshold will skip the rest of the configured rulesets for archives.", + SerializedName = @"minimumSizeForExpansion", + PossibleTypes = new [] { typeof(long) })] + public long ArchiveMinimumSizeForExpansion { get => _propertiesBody.ArchiveMinimumSizeForExpansion ?? default(long); set => _propertiesBody.ArchiveMinimumSizeForExpansion = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum + /// will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Specifies the maximum allowed size (in bytes) for files to be replicated. Any file size greater than maximum will be denied replication.", + SerializedName = @"maximum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMaximum { get => _propertiesBody.DataSizeMaximum ?? default(long); set => _propertiesBody.DataSizeMaximum = value; } + + /// + /// Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any + /// file size less than minimum will be denied replication. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Optional. Default is 0. Specifies the minimum required size (in bytes) for a file to be eligible for replication. Any file size less than minimum will be denied replication.", + SerializedName = @"minimum", + PossibleTypes = new [] { typeof(long) })] + public long DataSizeMinimum { get => _propertiesBody.DataSizeMinimum ?? default(long); set => _propertiesBody.DataSizeMinimum = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// A description of the FlowProfile that defines the replication scenario. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A description of the FlowProfile that defines the replication scenario.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A description of the FlowProfile that defines the replication scenario.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _propertiesBody.Description ?? null; set => _propertiesBody.Description = value; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _propertiesBody.IdentityType ?? null; set => _propertiesBody.IdentityType = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer + /// to the MimeTypeFiler model. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the Media types (f.k.a MIME types) and associated file extensions to be filtered. For more detail, please refer to the MimeTypeFiler model.", + SerializedName = @"filters", + PossibleTypes = new [] { typeof(ADT.Models.IMimeTypeFilter) })] + public ADT.Models.IMimeTypeFilter[] MimeFilter { get => _propertiesBody.MimeFilter?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.MimeFilter = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the filter is an allow list or deny list. For more detail, please refer to the FilterType model.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Allow", "Deny")] + public string MimeFilterType { get => _propertiesBody.MimeFilterType ?? null; set => _propertiesBody.MimeFilterType = value; } + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private ADT.Models.IDataTransferIdentity _pipelineInputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public ADT.Models.IDataTransferIdentity PipelineInputObject { get => this._pipelineInputObject; set => this._pipelineInputObject = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The operational status of the FlowProfile. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The operational status of the FlowProfile.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operational status of the FlowProfile.", + SerializedName = @"status", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Obsolete", "Enabled")] + public string Status { get => _propertiesBody.Status ?? null; set => _propertiesBody.Status = value; } + + /// Resource tags. + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(ADT.Models.IFlowProfilePatchTags) })] + public ADT.Models.IFlowProfilePatchTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// A list of text patterns to block, each with matching rules and case sensitivity options. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A list of text patterns to block, each with matching rules and case sensitivity options.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of text patterns to block, each with matching rules and case sensitivity options.", + SerializedName = @"deny", + PossibleTypes = new [] { typeof(ADT.Models.ITextMatch) })] + public ADT.Models.ITextMatch[] TextMatchingDeny { get => _propertiesBody.TextMatchingDeny?.ToArray() ?? null /* fixedArrayOf */; set => _propertiesBody.TextMatchingDeny = (value != null ? new System.Collections.Generic.List(value) : null); } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [global::ADT.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(ADT.Models.IUserAssignedIdentities) })] + public ADT.Models.IUserAssignedIdentities UserAssignedIdentity { get => _propertiesBody.IdentityUserAssignedIdentity ?? null /* object */; set => _propertiesBody.IdentityUserAssignedIdentity = value; } + + /// The default XML namespace used for schema validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The default XML namespace used for schema validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default XML namespace used for schema validation.", + SerializedName = @"defaultNamespace", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterDefaultNamespace { get => _propertiesBody.XmlFilterDefaultNamespace ?? null; set => _propertiesBody.XmlFilterDefaultNamespace = value; } + + /// Defines the method for referencing the xml schema. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Defines the method for referencing the xml schema.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Defines the method for referencing the xml schema.", + SerializedName = @"reference", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.PSArgumentCompleterAttribute("Inline")] + public string XmlFilterReference { get => _propertiesBody.XmlFilterReference ?? null; set => _propertiesBody.XmlFilterReference = value; } + + /// The inline XSD schema to be used for validation. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The inline XSD schema to be used for validation.")] + [global::ADT.Category(global::ADT.ParameterCategory.Body)] + [ADT.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The inline XSD schema to be used for validation.", + SerializedName = @"schema", + PossibleTypes = new [] { typeof(string) })] + public string XmlFilterSchema { get => _propertiesBody.XmlFilterSchema ?? null; set => _propertiesBody.XmlFilterSchema = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded + /// + public ADT.Cmdlets.UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded Clone() + { + var clone = new UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (PipelineInputObject?.Id != null) + { + this.PipelineInputObject.Id += $"/flowProfiles/{(global::System.Uri.EscapeDataString(this.Name.ToString()))}"; + await this.Client.FlowProfilesUpdateViaIdentity(PipelineInputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeUpdate); + } + else + { + // try to call with PATH parameters from Input Object + if (null == PipelineInputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + if (null == PipelineInputObject.PipelineName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("PipelineInputObject has null value for PipelineInputObject.PipelineName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, PipelineInputObject) ); + } + await this.Client.FlowProfilesUpdate(PipelineInputObject.SubscriptionId ?? null, PipelineInputObject.ResourceGroupName ?? null, PipelineInputObject.PipelineName ?? null, Name, _propertiesBody, onOk, onDefault, this, Pipeline, ADT.Runtime.SerializationMode.IncludeUpdate); + } + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet + /// class. + /// + public UpdateAzDataTransferFlowProfile_UpdateViaIdentityPipelineExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath.cs new file mode 100644 index 000000000000..2db879c98165 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath.cs @@ -0,0 +1,594 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Applies partial update to an existing FlowProfile resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDataTransferFlowProfile_UpdateViaJsonFilePath", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Applies partial update to an existing FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + public global::System.String _jsonString; + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonFilePath; + + /// Path of Json file supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Path of Json file supplied to the Update operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Path of Json file supplied to the Update operation", + SerializedName = @"JsonFilePath", + PossibleTypes = new [] { typeof(string) })] + public string JsonFilePath { get => this._jsonFilePath; set { if (!System.IO.File.Exists(value)) { throw new Exception("Cannot find File " + value); } this._jsonString = System.IO.File.ReadAllText(value); this._jsonFilePath = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath + public ADT.Cmdlets.UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath Clone() + { + var clone = new UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + clone.JsonFilePath = this.JsonFilePath; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesUpdateViaJsonString(SubscriptionId, ResourceGroupName, PipelineName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzDataTransferFlowProfile_UpdateViaJsonFilePath() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonString.cs new file mode 100644 index 000000000000..45a967b71e64 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlowProfile_UpdateViaJsonString.cs @@ -0,0 +1,592 @@ +// 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 ADT.Cmdlets +{ + using static ADT.Runtime.Extensions; + using ADT.Runtime.PowerShell; + using ADT.Runtime.Cmdlets; + using System; + + /// Applies partial update to an existing FlowProfile resource. + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzDataTransferFlowProfile_UpdateViaJsonString", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlowProfile))] + [global::ADT.Description(@"Applies partial update to an existing FlowProfile resource.")] + [global::ADT.Generated] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/pipelines/{pipelineName}/flowProfiles/{flowProfileName}", ApiVersion = "2025-05-30-preview")] + [global::ADT.NotSuggestDefaultParameterSet] + public partial class UpdateAzDataTransferFlowProfile_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, + ADT.Runtime.IEventListener, + ADT.Runtime.IContext + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A dictionary to carry over additional data for pipeline. + private global::System.Collections.Generic.Dictionary _extensibleParameters = new System.Collections.Generic.Dictionary(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// Accessor for cancellationTokenSource. + public global::System.Threading.CancellationTokenSource CancellationTokenSource { get => _cancellationTokenSource ; set { _cancellationTokenSource = value; } } + + /// The reference to the client API class. + public ADT.DataTransfer Client => ADT.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::ADT.Category(global::ADT.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Accessor for extensibleParameters. + public global::System.Collections.Generic.IDictionary ExtensibleParameters { get => _extensibleParameters ; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public ADT.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _jsonString; + + /// Json string supplied to the Update operation + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Json string supplied to the Update operation")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Json string supplied to the Update operation", + SerializedName = @"JsonString", + PossibleTypes = new [] { typeof(string) })] + public string JsonString { get => this._jsonString; set => this._jsonString = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action ADT.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken ADT.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// + /// The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters + /// or hyphens. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens.", + SerializedName = @"flowProfileName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlowProfileName")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + public ADT.Runtime.HttpPipeline Pipeline { get; set; } + + /// Backing field for property. + private string _pipelineName; + + /// The name of the pipeline on which to operate. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the pipeline on which to operate.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pipeline on which to operate.", + SerializedName = @"pipelineName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string PipelineName { get => this._pipelineName; set => this._pipelineName = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::ADT.Category(global::ADT.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [ADT.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [ADT.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id", + SetCondition = @"")] + [global::ADT.Category(global::ADT.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = ADT.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + ADT.Runtime.AttachDebugger.Break(); + } + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of UpdateAzDataTransferFlowProfile_UpdateViaJsonString + public ADT.Cmdlets.UpdateAzDataTransferFlowProfile_UpdateViaJsonString Clone() + { + var clone = new UpdateAzDataTransferFlowProfile_UpdateViaJsonString(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.PipelineName = this.PipelineName; + clone.Name = this.Name; + clone.JsonString = this.JsonString; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = ADT.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task ADT.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case ADT.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case ADT.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case ADT.Runtime.Events.Progress: + { + var data = messageData(); + int progress = (int)data.Value; + string activityMessage, statusDescription; + global::System.Management.Automation.ProgressRecordType recordType; + if (progress < 100) + { + activityMessage = "In progress"; + statusDescription = "Checking operation status"; + recordType = System.Management.Automation.ProgressRecordType.Processing; + } + else + { + activityMessage = "Completed"; + statusDescription = "Completed"; + recordType = System.Management.Automation.ProgressRecordType.Completed; + } + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, activityMessage, statusDescription) + { + PercentComplete = progress, + RecordType = recordType + }); + return ; + } + case ADT.Runtime.Events.DelayBeforePolling: + { + var data = messageData(); + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new ADT.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + else + { + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + int delay = (int)(response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + WriteDebug($"Delaying {delay} seconds before polling."); + for (var now = 0; now < delay; ++now) + { + WriteProgress(new global::System.Management.Automation.ProgressRecord(1, "In progress", "Checking operation status") + { + PercentComplete = now * 100 / delay + }); + await global::System.Threading.Tasks.Task.Delay(1000, token); + } + } + } + break; + } + } + await ADT.Module.Instance.Signal(id, token, messageData, (i, t, m) => ((ADT.Runtime.IEventListener)this).Signal(i, t, () => ADT.Runtime.EventDataConverter.ConvertFrom(m()) as ADT.Runtime.EventData), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'FlowProfilesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new ADT.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new ADT.Runtime.PowerShell.AsyncCommandRuntime(this, ((ADT.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((ADT.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletGetPipeline); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = ADT.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName, this.ExtensibleParameters); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as ADT.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletBeforeAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlowProfilesUpdateViaJsonString(SubscriptionId, ResourceGroupName, PipelineName, Name, _jsonString, onOk, onDefault, this, Pipeline); + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletAfterAPICall); if( ((ADT.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (ADT.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,PipelineName=PipelineName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((ADT.Runtime.IEventListener)this).Signal(ADT.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((ADT.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Initializes a new instance of the cmdlet class. + /// + public UpdateAzDataTransferFlowProfile_UpdateViaJsonString() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + ADT.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IErrorResponse from + /// the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new ADT.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a ADT.Models.IFlowProfile from the + /// remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be ADT.Models.IFlowProfile + var result = (await response); + WriteObject(result, false); + } + } + } +} \ No newline at end of file diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateExpanded.cs index 167b9e08715e..bf85cda798b1 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"update the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class UpdateAzDataTransferFlow_UpdateExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityConnectionExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityConnectionExpanded.cs index 66aeb33f1a06..3b827e4ab389 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityConnectionExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityConnectionExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"update the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class UpdateAzDataTransferFlow_UpdateViaIdentityConnectionExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityExpanded.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityExpanded.cs index 422b521ae48e..7d2c80218f98 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityExpanded.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaIdentityExpanded.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"update the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] public partial class UpdateAzDataTransferFlow_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, ADT.Runtime.IContext diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonFilePath.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonFilePath.cs index 181327ecd29d..926953f97eb6 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonFilePath.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"update the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class UpdateAzDataTransferFlow_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonString.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonString.cs index 650b73c50d53..2b5c3e9a2448 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonString.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/cmdlets/UpdateAzDataTransferFlow_UpdateViaJsonString.cs @@ -18,7 +18,7 @@ namespace ADT.Cmdlets [global::System.Management.Automation.OutputType(typeof(ADT.Models.IFlow))] [global::ADT.Description(@"update the flow resource.")] [global::ADT.Generated] - [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-21")] + [global::ADT.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureDataTransfer/connections/{connectionName}/flows/{flowName}", ApiVersion = "2025-05-30-preview")] [global::ADT.NotSuggestDefaultParameterSet] public partial class UpdateAzDataTransferFlow_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, ADT.Runtime.IEventListener, diff --git a/generated/DataTransfer/DataTransfer.Autorest/generated/runtime/Context.cs b/generated/DataTransfer/DataTransfer.Autorest/generated/runtime/Context.cs index 33d6dc2f7af7..7f50407db539 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/generated/runtime/Context.cs +++ b/generated/DataTransfer/DataTransfer.Autorest/generated/runtime/Context.cs @@ -20,7 +20,7 @@ namespace ADT.Runtime /// The IContext Interface defines the communication mechanism for input customization. /// /// - /// In the context, we will have client, pipeline, PSBoundParamters, default EventListener, Cancellation. + /// In the context, we will have client, pipeline, PSBoundParameters, default EventListener, Cancellation. /// public interface IContext { diff --git a/generated/DataTransfer/DataTransfer.Autorest/internal/Invoke-AzDataTransferExecutePipelineAction.ps1 b/generated/DataTransfer/DataTransfer.Autorest/internal/Invoke-AzDataTransferExecutePipelineAction.ps1 index 4c4bca41b84b..ed00f716f27e 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/internal/Invoke-AzDataTransferExecutePipelineAction.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/internal/Invoke-AzDataTransferExecutePipelineAction.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Executes a privileged action for a pipeline. +Executes a privileged or administrative action on the specified Pipeline. .Description -Executes a privileged action for a pipeline. +Executes a privileged or administrative action on the specified Pipeline. .Example {{ Add code here }} .Example @@ -44,8 +44,9 @@ ACTION : The action to be executed. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -61,7 +62,7 @@ param( [Parameter(ParameterSetName='ExecuteViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Execute', Mandatory)] diff --git a/generated/DataTransfer/DataTransfer.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/DataTransfer/DataTransfer.Autorest/internal/ProxyCmdletDefinitions.ps1 index 4c4bca41b84b..111ba817bcd9 100644 --- a/generated/DataTransfer/DataTransfer.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/DataTransfer/DataTransfer.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Executes a privileged action for a pipeline. +Executes a privileged or administrative action on the specified Pipeline. .Description -Executes a privileged action for a pipeline. +Executes a privileged or administrative action on the specified Pipeline. .Example {{ Add code here }} .Example @@ -44,8 +44,9 @@ ACTION : The action to be executed. INPUTOBJECT : Identity Parameter [ConnectionName ]: The name for the connection to perform the operation on. [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. [Id ]: Resource identity path - [PipelineName ]: The name for the pipeline to perform the operation on. + [PipelineName ]: The name of the pipeline on which to operate. [ResourceGroupName ]: The name of the resource group. The name is case insensitive. [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. .Link @@ -61,7 +62,7 @@ param( [Parameter(ParameterSetName='ExecuteViaJsonString', Mandatory)] [ADT.Category('Path')] [System.String] - # The name for the pipeline to perform the operation on. + # The name of the pipeline on which to operate. ${PipelineName}, [Parameter(ParameterSetName='Execute', Mandatory)] @@ -262,3 +263,212 @@ end { } } } + +<# +.Synopsis +Deletes the specified FlowProfile resource. +.Description +Deletes the specified FlowProfile resource. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +ADT.Models.IDataTransferIdentity +.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 + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferflowprofile +#> +function Remove-AzDataTransferFlowProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityPipeline', Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityPipeline', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Delete = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_Delete'; + DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_DeleteViaIdentity'; + DeleteViaIdentityPipeline = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_DeleteViaIdentityPipeline'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/generated/DataTransfer/DataTransfer.Autorest/internal/Remove-AzDataTransferFlowProfile.ps1 b/generated/DataTransfer/DataTransfer.Autorest/internal/Remove-AzDataTransferFlowProfile.ps1 new file mode 100644 index 000000000000..039bf67c39e5 --- /dev/null +++ b/generated/DataTransfer/DataTransfer.Autorest/internal/Remove-AzDataTransferFlowProfile.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 the specified FlowProfile resource. +.Description +Deletes the specified FlowProfile resource. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +ADT.Models.IDataTransferIdentity +.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 + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + +PIPELINEINPUTOBJECT : Identity Parameter + [ConnectionName ]: The name for the connection to perform the operation on. + [FlowName ]: The name for the flow to perform the operation on. + [FlowProfileName ]: The name of the FlowProfile resource to operate on. Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + [Id ]: Resource identity path + [PipelineName ]: The name of the pipeline on which to operate. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. +.Link +https://learn.microsoft.com/powershell/module/az.datatransfer/remove-azdatatransferflowprofile +#> +function Remove-AzDataTransferFlowProfile { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Parameter(ParameterSetName='DeleteViaIdentityPipeline', Mandatory)] + [Alias('FlowProfileName')] + [ADT.Category('Path')] + [System.String] + # The name of the FlowProfile resource to operate on. + # Must be 3 to 64 characters long and contain only alphanumeric characters or hyphens. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the pipeline on which to operate. + ${PipelineName}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [ADT.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [ADT.Category('Path')] + [ADT.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${InputObject}, + + [Parameter(ParameterSetName='DeleteViaIdentityPipeline', Mandatory, ValueFromPipeline)] + [ADT.Category('Path')] + [ADT.Models.IDataTransferIdentity] + # Identity Parameter + ${PipelineInputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [ADT.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [ADT.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [ADT.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [ADT.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [ADT.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [ADT.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 + + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('ADT.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + + $mapping = @{ + Delete = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_Delete'; + DeleteViaIdentity = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_DeleteViaIdentity'; + DeleteViaIdentityPipeline = 'Az.DataTransfer.private\Remove-AzDataTransferFlowProfile_DeleteViaIdentityPipeline'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId') ) { + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + if ($wrappedCmd -eq $null) { + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Function) + } + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +}